Skip to content

fix: use build.project_name for bootloader artifacts#3164

Open
officialasishkumar wants to merge 1 commit into
arduino:masterfrom
officialasishkumar:fix-build-project-name-bootloader
Open

fix: use build.project_name for bootloader artifacts#3164
officialasishkumar wants to merge 1 commit into
arduino:masterfrom
officialasishkumar:fix-build-project-name-bootloader

Conversation

@officialasishkumar

Copy link
Copy Markdown

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features) - not applicable; this restores existing artifact naming behavior for custom build.project_name values.
  • UPGRADING.md has been updated with a migration guide (for breaking changes) - not applicable; this is not a breaking change.
  • configuration.schema.json updated if new parameters are added. - not applicable; no configuration parameters are added.

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

Fixes #3108.

When compile is run with a custom --build-property build.project_name=..., the main output artifacts use the custom project name, but the bootloader merge step still looks for artifacts named after the original sketch file. As a result, .with_bootloader.hex and .with_bootloader.bin are not generated for the custom project name.

What is the new behavior?

The bootloader merge step uses the resolved build.project_name, falling back to the sketch main filename only when the property is unavailable. This produces the expected custom-named bootloader artifacts alongside the other custom-named build outputs.

Does this PR introduce a breaking change, and is titled accordingly?

No.

Other information

Validation run locally:

  • go test ./internal/arduino/builder -run TestMergeSketchWithBootloaderUsesBuildProjectName -count=1
  • go test ./internal/arduino/builder -count=1
  • go build
  • go test ./internal/integrationtest/compile_1 -run '^TestCompile$/^WithCustomBuildPath$/^OutsideSketchWithBuildProjectName$' -count=1 -timeout 20m
@CLAassistant

CLAassistant commented Apr 13, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants