Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved {build.*.platform.path} vars enumeration. #2652

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 25, 2024

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)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

This is a tentative fix for #2616. The original issue provided an experimental platform that extends esp32 to experiment with.
This PR adds the following template variables that will be available to compose recipes:

  • {build.core.platform.path} contains the path to the reference (build) platform
  • {build.board.platform.path} contains the path to the board platform

Also, adds the input variable build.use_core_platform_for_runtime_platform_path to be set on boards.txt or platform.txt:

  • if set to true then the value of {runtime.platform.path} will be the path to the reference platform.
  • in all other cases (unset or !=true) the value of {runtime.platform.path} will be the path to the board platform (as it always has been)

What is the current behavior?

The compile fails with an "extended" platforms

What is the new behavior?

Unfortunately, the compile still fails. Hopefully, this PR could help to resolve the remaining issues.

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

Other information

/cc @egnor

@cmaglie cmaglie self-assigned this Jun 25, 2024
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: build-process Related to the sketch build process labels Jun 25, 2024
Copy link

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.23%. Comparing base (8b6ad25) to head (452cf32).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2652      +/-   ##
==========================================
- Coverage   70.26%   70.23%   -0.04%     
==========================================
  Files         222      222              
  Lines       21343    21348       +5     
==========================================
- Hits        14996    14993       -3     
- Misses       5161     5176      +15     
+ Partials     1186     1179       -7     
Flag Coverage Δ
unit 70.23% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@egnor
Copy link

egnor commented Jun 26, 2024

(kibitz: build.use_core_platform_for_runtime_platform_path might not be quite right, since it doesn't just affect the build but in fact just about any variable, including upload and so on?)

@egnor
Copy link

egnor commented Jul 17, 2024

(This seems to work, by the way! -- see #2616 (comment) -- is it likely to land any time soon?)

@cmaglie
Copy link
Member Author

cmaglie commented Jul 26, 2024

(kibitz: build.use_core_platform_for_runtime_platform_path might not be quite right, since it doesn't just affect the build but in fact just about any variable, including upload and so on?)

Uhm... ok I'll rename it to runtime.use_core_platform_path_for_runtime_platform_path.

(This seems to work, by the way! -- see #2616 (comment) -- is it likely to land any time soon?)

Yes, sorry for the long delay, I'm updating the docs right now, and it should be ready for the next release.

@cmaglie cmaglie force-pushed the improve_runtime_paths_vars branch from 7af9663 to 5976053 Compare July 26, 2024 11:06
@cmaglie cmaglie marked this pull request as ready for review July 26, 2024 11:08
@cmaglie cmaglie force-pushed the improve_runtime_paths_vars branch from 5976053 to 7a5cf9d Compare July 26, 2024 11:08
@cmaglie cmaglie linked an issue Jul 26, 2024 that may be closed by this pull request
3 tasks
@cmaglie cmaglie force-pushed the improve_runtime_paths_vars branch from 7a5cf9d to 0b80ef6 Compare July 26, 2024 11:28
Copy link
Contributor

@alessio-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

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

lgtm

@cmaglie cmaglie merged commit b8c927b into arduino:master Jul 26, 2024
103 checks passed
@cmaglie cmaglie deleted the improve_runtime_paths_vars branch July 26, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of {runtime.platform.path} makes referencing other cores often impossible
3 participants