Skip to content

[stable13.1] unite new cpp endpoint code with master - #11758

Open
Richard Knoll (riknoll) wants to merge 4 commits into
stable13.1from
dev/riknoll/cp-extension-info-fixes
Open

Richard Knoll (riknoll) wants to merge 4 commits into
stable13.1from
dev/riknoll/cp-extension-info-fixes

Conversation

@riknoll

Copy link
Copy Markdown
Member

bringing over the changes from #11757

@riknoll
Richard Knoll (riknoll) requested a review from a team November 12, 2026 23:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
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

Comment thread pxtlib/extensionrequest.ts Resolved
Comment thread pxtlib/extensionrequest.ts Resolved
}
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)],
Comment thread pxtlib/extensionrequest.ts Resolved
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);
Comment thread pxtlib/package.ts Resolved
Comment thread pxtlib/packageutils.ts Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants