-
-
Notifications
You must be signed in to change notification settings - Fork 398
Fix casing of assembly sketch files #1231
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
Why this change? Isn't lowercase Also, AFAICS this does not change just the Also, I disagree that this is not a breaking change, since this can make sketches that used to work now fail to compile when they use lowercase Also, if this is changed, I think that all IDEs should be changed accordingly to no longer load files that will not be compiled? Then at least things are consistent and less surprising for the user (but I'm not in favor of changing this). |
This change stems form this issue: arduino/arduino-ide#218
Yup.
I didn't mark it as a breaking change just because it was categorized as a bug otherwise I'd have done it. Anyway paging @per1234, @ubidefeo and @cmaglie. Want to hear their opinion about this. I can drop this PR we don't like this change. |
@silvanocerza |
The problem is that the Java Arduino IDE only compiles assembly files if the extension is
I'm not against adding support for The general approach to something like that might be to making the necessary changes in the code, but controlled via a "feature toggle". Only once the support has been added to all the development software (Arduino IDE, Arduino CLI, Arduino Web Editor), are the releases made with the feature enabled. |
At a first glance I had the same thinking as @matthijskooijman but looking closely at the report from the issue arduino/arduino-ide#218 the user says
The same happens with So it seems that the actual selection of files to compile is not done in the code touched by this PR and this patch is really not breaking. |
I can't agree more. So the way forward is to change the Arduino IDE 2.0 to match the other tools, I know that there is a gRPC service used by the IDE 2.0 to get the list of files to open and I think this is the purpose of this PR. Can you confirm it @silvanocerza? |
I confirm this changes the gRPC interface. I used a sketch containing this files to test:
This is before the changes of this PR:
this is after:
As you can see the |
For the record, here is where the actual build file selection happens: arduino-cli/legacy/builder/builder_utils/utils.go Lines 69 to 82 in 0ddb024
the function |
Bummer, merged before I finished my (overly long, as often) response... I'll post it below anyway as it has some thoughts on followup actions. The only objection I had to the PR that is now merged is the commit message could have been more clear, but well, that's in the past now :-)
Thanks for providing the issue link, that helps understand where this comes from :-) So there's a separate list for "copy into build dir" (which is now case insensitive) and "apply this recipe to these extensions" (which I presume is now case insensitive). If that's the case, then this commit really unifies the "copy into build dir" behavior" with the "apply recipe" behavior, which makes sense to me, but the commit message should probably be updated to reflect this (and link to the issue as well, I'd say) before merging then. Note that if this is the case, there is still a small compatibility issue: I expect that currently you could
This is another approach, just make everything case insensitive, which would probably require changes in the IDEs as well to match. This would also be a reasonable option IMHO, which could reduce user surprise. I also vaguely recall another related issue or PR not so long ago that also considered case sensitivity of extensions and where we also identified these two separate lists, and considered to unify them but I can't quite find this anymore... In any case, it might be something to consider: adding a global extension-to-recipe map, modify Also: If we're touching these lists, and maybe also need matching changes in the IDEs, maybe it would be good to review the list of extensions and add additional ones (e.g. #1149 and https://github.com/arduino/arduino-builder/issues/268) |
Thanks! Your input is invariably excellent.
I remember it also. Here it is: |
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Fixes a bug with sketch files parsing.
Both
.s
and.S
extensions are accepted as Sketch assembly files.Now only
.S
extensions are accepted as Sketch files.titled accordingly?
Nope.
This will also enforce lowercase for other files extensions.
See how to contribute