platformio / platformio/platformio-core
Provide a `${this.__name__}` variable (like `${this.__env__}` but valid in all sections)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.5k
- Forks
- 905
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Description
What kind of issue is this?
- Feature Request.
Configuration
PlatformIO Version (platformio --version): 6.1.6
Description of problem
As stated in https://github.com/platformio/platformio-core/issues/4480#issuecomment-1404253063, I am using ${this.__env__} to get the environment name in a non-environment section that will later be extended by an environment. This is being rejected as invalid (but it works) so I need the suggested ${this.__name__} to insert the name of the section/environment when the value is being evaluated.
[a]
test_testing_command =
script.sh
${platformio.build_dir}/${this.__name__}/test
${platformio.build_dir}/${this.__name__}/program
[env:b]
extends = a
Where ${this.__name__} is expected to evaluate to b when the test_testing_command is used (this works with ${this.__env__} on 6.1.5).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuration variable evaluation path described in the issue and compare how ${this.__env__} is handled in environment and non-environment sections. Use the [a] and [env:b] example to verify that ${this.__name__} resolves to b when the extended test command is used; done means the variable is accepted and evaluates correctly without regressing existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100