Repository navigation
Conversation
jetm
force-pushed
the
feed-loop/init-minimal
branch
from
November 12, 2026 15:03
e95e68f to
7c15ceb
Compare
jetm
marked this pull request as ready for review
November 12, 2026 21:18
jetm
force-pushed
the
feed-loop/init-minimal
branch
from
November 12, 2026 22:59
7c15ceb to
f5803ae
Compare
The generated avocado.yaml template still pins cli_requirement to >=0.41.0, which no longer reflects the CLI version that new projects are meant to be created for. Projects initialized with the current CLI would accept older releases that lack features the template relies on. Raise the template requirement to >=1.0.0 so new projects require a compatible CLI. Pre-release builds such as 1.1.0-dev must still satisfy this range, since development builds are used to initialize and build projects. Older releases like 0.99.0 must be rejected. Split the version comparison out of check_cli_requirement into a helper that accepts an explicit version. The existing check always compares against the compiled package version, which made it impossible to verify pre-release and older-version behavior in tests. The helper lets a test validate the generated template against chosen versions without depending on the build's own version. Signed-off-by: Javier Tia <javier@peridio.com>
The default project template always pulls in avocado-ext-dev, avocado-ext-sshd-dev and the board BSP as remote package extensions. When the user builds against a feed that does not carry these packages, the first build fails on dependency resolution. This blocks bootstrapping a project from such a feed, since the generated config has to be edited by hand before anything can be built. Add a --minimal option to init that generates the template without those extensions, leaving only the local application extension. The default output is unchanged so existing workflows keep working. The option only applies to the generated template, because a project fetched with --reference is a user-chosen snapshot and should not be rewritten. Strip the extensions by removing exact template blocks rather than parsing and re-serializing the YAML. This preserves the comments and formatting of the template. The exactness is guarded by a test that validates the minimal output, so a template edit that breaks a block is caught instead of silently producing a config that still references the dropped extensions. Signed-off-by: Javier Tia <javier@peridio.com>
The semantics of `enabled: false` on a runtime extension entry are easy to misread. It looks like a switch that would drop the extension entirely, but the intended behavior is narrower: the flag only decides whether the extension ships in the runtime image. Nothing currently guards this, so a future change could silently stop fetching shipped-off extensions at SDK install and break builds that depend on them being present. Add regression tests at both layers that decide which extensions get fetched. One covers the active extension set computed from the composed config, and the other covers the install command's required extension list. Both use a runtime with an enabled extension and a shipped-off one, and assert that both are still reported. This pins the agreed ruling so any deliberate change in semantics has to update the tests explicitly. Signed-off-by: Javier Tia <javier@peridio.com>
New projects now demand a newer CLI and can opt out of the default remote extensions. Without a note, the raised requirement looks like an unexplained failure and --minimal stays undiscoverable. Record --minimal under Added and the cli_requirement bump under Changed. Signed-off-by: Javier Tia <javier@peridio.com>
A reference project is copied as authored, so --minimal has nothing to omit from it and was silently ignored. Make clap refuse the pair so the user learns the flag did not apply instead of assuming a trimmed config. Signed-off-by: Javier Tia <javier@peridio.com>
jetm
force-pushed
the
feed-loop/init-minimal
branch
from
November 12, 2026 23:24
f5803ae to
e247d17
Compare
Contributor
Author
|
Consolidated into #394, which carries this layer's commits together with the rest of the feed-first stack. Closing so review happens in one place. |
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.
Problem
avocado initalways wrote three remote extensions, so a first install against a feed without an extension repository failed. The template also required a CLI version that rejects pre-release builds.Solution
init --minimalwrites a project with only the local app extension. The template requires>=1.0.0, which pre-release builds of 1.1.0 satisfy.Key changes
--minimalflag through a builder method, with a validity test.cli_requirementbumped to>=1.0.0.enabled: falseextensions are still fetched.Reviewer notes
The last test makes explicit that
enabled: falsekeeps its current meaning. Tests: 2,372 passed (same single existing failure).