Skip to content

copy native build files from target, not file list - #11771

Merged
Richard Knoll (riknoll) merged 2 commits into
masterfrom
dev/riknoll/copy-build-files
Nov 19, 2026
Merged

Richard Knoll (riknoll) merged 2 commits into
masterfrom
dev/riknoll/copy-build-files

Conversation

@riknoll

Copy link
Copy Markdown
Member

fixes the raspberry pi build failure in common packages

@riknoll
Richard Knoll (riknoll) added this pull request to the merge queue Nov 19, 2026

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

Bundled build-file changes can leave projectCompileSha unchanged, allowing fallback cache lookups to return binaries built with outdated files.

5 open issues
What changed in this PR

Updates native extension generation to recover build configuration files from target bundles when backend requests omit them, addressing the Raspberry Pi build failure in common packages.

Changes:

  • Restore bundled Makefile, sdkconfig.defaults, and CMakeLists.txt files, giving bundled contents precedence over supplied copies.
  • Add regression coverage for restoration, input immutability, and native extension hash changes when bundled contents change.
File Description
tests/​cli-test/​clirunner.ts Tests bundled-file restoration, override handling, dependency sources, and hash changes.
pxtlib/​shared/​extensioninfo.ts Restores bundled build-file names and reads their contents from the target bundle.

Review effort: Max

Comment on lines +179 to +180
const bundledFile = bundledPackages[id] && bundledPackages[id][name];
if (bundledFile != null) return bundledFile;
Comment on lines +179 to +180
const bundledFile = bundledPackages[id] && bundledPackages[id][name];
if (bundledFile != null) return bundledFile;
Comment on lines +229 to +231
if (pkg.path) {
const id = pkg.path.slice("pxt_modules/".length, -1);
const bundledFiles = bundledPackages[id];
Comment on lines +230 to +231
const id = pkg.path.slice("pxt_modules/".length, -1);
const bundledFiles = bundledPackages[id];
Comment on lines +233 to +234
if (bundledFiles && bundledFiles[name] != null && pkg.files.indexOf(name) < 0)
pkg.files.push(name);
Merged via the queue into master with commit 2dd9158 Nov 19, 2026
20 checks passed
@riknoll
Richard Knoll (riknoll) deleted the dev/riknoll/copy-build-files branch November 19, 2026 00:40
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.

3 participants