Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Build the bundled flatc only when its inputs changed, and build it in parallel

已关闭
#1,985 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #1998 来自 @oberstet —— 已合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
22/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
cmake, python
领域
build-system

调研方向

Start in hatch_build.py, at _build_flatc(), which currently deletes deps/flatbuffers/build, reconfigures with cmake, and builds flatc on one core. Read the just recipes that invoke the build, and the linked zlmdb issue for the shared design. Done means a stamp stored beside the packaged binary lets an unchanged build be skipped, the build runs with parallel jobs, AUTOBAHN_FORCE_FLATC_BUILD=1 forces a rebuild, and just clean clears the stamp. The issue asks for one implementation synced to zlmdb, so the design needs maintainer agreement first.

由索引模型根据 Issue 内容生成。

描述

Same problem and same fix as crossbario/zlmdb#TODO. The two repositories share
hatch_build.py _build_flatc().

On every build, including every editable install, _build_flatc() deletes
deps/flatbuffers/build, configures with cmake again, and builds flatc on one core
(cmake --build without --parallel). Local just recipes that install first therefore
rebuild the same flatc from the same source again and again.

Proposal, as detailed in the zlmdb issue:

  • a sha256 stamp over what flatc is built from: the deps/flatbuffers commit (and
    whether it has local changes), the configure arguments, the target platform and
    toolchain, and a version for the build logic. Store it next to the packaged binary;
  • skip the build when the binary exists and the stamp matches. Otherwise build
    incrementally, keeping the build directory unless the configure arguments or the
    toolchain changed;
  • build in parallel (--parallel <os.cpu_count()>, unless CMAKE_BUILD_PARALLEL_LEVEL
    is set);
  • force a rebuild with AUTOBAHN_FORCE_FLATC_BUILD=1, and in just clean.

The toolchain in the stamp also keeps a host-built flatc out of wheels built for
another architecture or libc in a container with the repository mounted.

Both repositories should use the same implementation, so it is written once and then
synced.

Note: This issue was drafted with AI assistance (Claude Code).

主要语言
Python
星标
2.5k
派生
767
平均合并
23 小时 55 分钟
30 天内合并 PR
25

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

crossbario/autobahn-python 的其他 Issue

查看 crossbario/autobahn-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。