feat: add inheritable-only field to filter processor-level targets#5270
Open
gandarez wants to merge 1 commit intotinygo-org:devfrom
Open
feat: add inheritable-only field to filter processor-level targets#5270gandarez wants to merge 1 commit intotinygo-org:devfrom
gandarez wants to merge 1 commit intotinygo-org:devfrom
Conversation
… listing Processor-level targets like esp32, rp2040, etc. have flash-method set so they leak through the existing heuristic filter in GetTargetSpecs and appear in `tinygo targets` output. Add an "inheritable-only" JSON field that is checked on raw JSON before inheritance resolution, preventing these non-board targets from being listed while keeping them loadable for direct builds and inheritance. Ref: tinygo-org#5178 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1e8a6eb to
c5dddd4
Compare
Contributor
|
Looks good- though I would have thought there were far more inheritable-only targets. Are these it? |
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.
Summary
"inheritable-only": trueJSON field to processor-level target files (esp32, esp32c3, esp32s3, esp8266, rp2040, rp2350, rp2350b) so they no longer appear intinygo targetsoutputGetTargetSpecs()reads the raw JSON before inheritance resolution to check the field, avoiding propagation to child board targetscortex-m.jsoninheritable-onlyremain loadable viatinygo build -target=esp32for backward compatibilityCloses #5178
Test plan
tinygo targetsno longer listsesp32,esp32c3,esp32s3,esp8266,rp2040,rp2350,rp2350besp32-coreboard-v2,picostill appear intinygo targetstinygo build -target=esp32still works (backward compat)go test ./compileopts/...to validate new test cases🤖 Generated with Claude Code