-
-
Notifications
You must be signed in to change notification settings - Fork 403
Always set the versioned runtime.tool property for all installed tools #1106
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
Conversation
For example if we have bossac 1.7.1 and 1.9.0 installed, this will result in the following properties available during upload: {runtime.tools.bossac-1.7.0-arduino3.path} => /path/to/bossac/1.7.0 {runtime.tools.bossac-1.9.0-arduino3.path} => /path/to/bossac/1.9.0 {runtime.tools.bossac.path} => /path/to/bossac/1.9.0 some platforms fails to correctly specify the version of the tool in the package_index.json but they do the correct specification in the recipes. This patch allows to not fail in this latter case.
Sounds like a good change, since IIUC this might also help with cores installed into I do wonder: How does this interact with different vendors supplying a tool by the same name? AFAICS you can specify the tool vendor explicitly in the JSON, but how is this handled for |
yes! that's another use case covered by this change
It's handled by |
Yeah, but I mean what if say, there is an |
ah good point... as it is now the result is undefined. The specification says:
in theory, if you write the required tools in the platform_index, and you do things correctly you will never encounter the case above. The problem may be present in the development phase where the package_index may still not be defined. Maybe adding a recipe like |
That sounds reasonable to me, yeah. AFAICS that allows fully and uniquely identifying a tool without ambiguity. Also, I wonder if this should be done instead of the versioned variables without the packager as added by the PR in its current state? OTOH, I guess the ambiguity is already present in the current code, right? Am I understanding correctly that:
Because of the possible ambiguity, I think we should document that Also, I wonder about the
But is that really true? Doesn't this point to the version (and packager) of the tool as specified in the Related: Should there be also a |
This PR allows solving, basically, 99.99% of the current user-facing issues and I would merge it anyway, even if it doesn't cover all the edge cases it helps to avoid the weird situation where you have a tool installed but it's not made available in the runtime variables.
yes the documentation is imprecise, we should fix it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested - works 🚀
Sounds fine to me. |
For example if we have bossac 1.7.1 and 1.9.0 installed, this will result in the following properties available during upload:
{runtime.tools.bossac-1.7.0-arduino3.path} => /path/to/bossac/1.7.0
{runtime.tools.bossac-1.9.0-arduino3.path} => /path/to/bossac/1.9.0
{runtime.tools.bossac.path} => /path/to/bossac/1.9.0
some platforms fail to correctly specify the version of the tool in the package_index.json but they do the correct specification in the recipes. This patch allows to not fail in this latter case.