Repository navigation
[stable13.1] unite new cpp endpoint code with master - #11758
Open
Richard Knoll (riknoll) wants to merge 4 commits into
Open
Richard Knoll (riknoll) wants to merge 4 commits into
Richard Knoll (riknoll) wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical issues can break simulator compilation, select the wrong hardware for cloud builds, and produce inconsistent native dependencies and compile settings between local and cloud builds.
8 open issues
Avoid requiring target versions for simulator-only builds · New Match full dependency IDs when resolving package directories · New Keep cppDependencies membership consistent with the loader · New Use installed package IDs for native-file condition checks · New Preserve root names when generating native source paths · New Preserve explicit compile-switch overrides in cloud requests · New Preserve active variant for targets without multiVariants · New Apply deprecated-field handling consistently to local builds · New
What changed in this PR
Aligns stable13.1’s native compile-request preparation with #11757, separating project-file collection and request construction from PXT’s package compilation flow.
Changes:
- Extracts reusable package, dependency, and project-file helpers.
- Adds canonical native request serialization, target-variant handling, and payload hashing.
- Adds warnings for obsolete build settings and supplies a target version in the shared test fixture.
| File | Description |
|---|---|
| tests/common/testUtils.ts | Adds the target version required by request validation. |
| pxtlib/packageutils.ts | Adds dependency/configuration helpers and collects project files. |
| pxtlib/package.ts | Delegates project compile-request creation to the new helpers. |
| pxtlib/extensionrequest.ts | Filters native files, applies target variants, and serializes and hashes requests. |
Review effort: Max
| } | ||
| const deps = dependencies(path); | ||
| for (const dep of Object.keys(deps).sort()) | ||
| visit(dep, deps[dep], runtime); |
| const id = path ? path.slice("pxt_modules/".length, -1) : "this"; | ||
|
|
||
| const nativeFiles = packageUtils.getConfigFiles( | ||
| original, !path, appTarget, dep => !!runtimePackages[resolvePath(dep)], |
| const overrides = result.variants && result.variants[variant]; | ||
| if (!overrides) | ||
| U.userError(U.lf("Variant '{0}' not defined in pxtarget.json", variant)); | ||
| U.jsonMergeFrom(result, overrides); |
Joey Wunderlich (jwunderl)
approved these changes
Nov 13, 2026
Abhijith Chatra (abchatra)
approved these changes
Nov 13, 2026
Abhijith Chatra (abchatra)
approved these changes
Nov 13, 2026
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.

bringing over the changes from #11757