Repository navigation
feat(prebuilt): decision-8b flag surface — hidden --prebuilt-core, global --no-prebuilt-libs (#1882) - #2170
Merged
Conversation
…ary (#1882) Adds the prebuilt-artifact switches the design doc fixes before the core-object serving ladder exists: the public global --no-prebuilt-libs opt-out, the hidden --prebuilt-core research opt-in, their FBUILD_* twins through the canonical env_flag truth table, and PrebuiltPolicy as the single typed verdict (opt-out wins over the opt-in, whatever source either came from). cli/prebuilt_notice reports an explicit decision once per build, in the shrink_notice (#1459) style: --prebuilt-core warns that core-object serving is not implemented yet and the framework compiles from source; --no-prebuilt-libs states the source compile. The default stays silent. Tests: policy resolution (flag x flag, env x env, flag x env), the env truth table incl. '' and a typo, wire-spelling round trip and its unknown -> None rule; CLI test 22 from the design doc (opt-in parses, opt-out is global, the two conflict, --prebuilt/--no-prebuilt rejected, --help documents the opt-out and never names the hidden flag).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the flag surface of decision 8b (
docs/design/artifact-serving-decisions.md), the required test 22 of #1882. No artifact is fetched, verified or extracted here — this PR is the decision, so the ladder that lands next reads a policy instead of re-deriving one from argv.Why now. The fingerprint half of #1882 is on
main(#2162/#2164/#2166/#2167/#2168/#2169: per-component stamps → framework identity → canonicalprebuilt_core_plan). That plan has no consumer because the fetch ladder does not exist, and the ladder cannot ship without a switch that says who asked for it. Today the CLI has no prebuilt switch at all (git grep prebuilt_libs= 0 hits), so even the public opt-out of decision 1 is missing.PrebuiltPolicy{Disabled, Libs, Core}(fbuild_build::prebuilt)Default = Libs(per-chip libraries may be used, core objects stay research)PrebuiltPolicy::resolve(no_prebuilt_libs, prebuilt_core)PrebuiltPolicy::resolve_with_env(.., env)/from_environmentFBUILD_NO_PREBUILT_LIBS/FBUILD_PREBUILT_COREthroughfbuild_core::env_flag(the canonical truth table:1/true/yes/on, and a typo is off)--no-prebuilt-libsglobal = true, documented in--help--prebuilt-coreconflicts_with = "no_prebuilt_libs"cli/prebuilt_notice.rsshrink_notice(#1459):--prebuilt-corewarns that core-object serving is not implemented yet and the framework compiles from source;--no-prebuilt-libsstates the source compile. Default stays silent.Test 22 from the design doc, one test each:
--prebuilt-coreparses;--no-prebuilt-libsis global and parses before the subcommand; the two conflict;--prebuilt/--no-prebuilt/--prebuilt-libs-coredo not parse;--helpdocuments--no-prebuilt-libsand never mentionsprebuilt-core. Policy tests cover opt-out-wins in every combination (flag×flag, env×env, flag×env), the canonical env truth table (including""and theturetypo), and the wire spelling round trip (disabled/libs/core, unknown →Nonerather than a silent default).Not in this PR: the fetch ladder (local verified cache →
mirrors[]→ source), bucket keys, and the--prebuilt-coreconsumer in the esp32 orchestrator — those follow once this policy is the thing they receive.#1882stays open.Closes nothing.