Skip to content

Use file passed on command line when using --upload or --verify #10756

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

Closed

Conversation

ArcanoxDragon
Copy link

This removes the requirement for .ino files to match their folder name when the Compiler is invoked via the command line with an explicit .ino file path. Fixes #10755 which in turn fixes microsoft/vscode-arduino#1100. When invoking compiler via --upload or --verify, it doesn't make sense to require the .ino sketch name to match the containing folder name, as other IDEs do not have a reason to enforce this requirement. This should allow tools like microsoft/vscode-arduino to eventually support multiple .ino files per project more gracefully as well.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

This removes the requirement for .ino files to match their folder name when the Compiler is invoked via the command line with an explicit .ino file path.
@matthijskooijman
Copy link
Collaborator

I believe this is the wrong approach to fix this.

With this change, the .ino file passed on the commandline becomes somehow special. So this means that you'll potentially get different results compiling a sketch, based on which of the multiple .ino files you pass on the commandline, which is not something that we would want. It also means that a sketch that is considered invalid by the GUI, is considered valid by the CLI, which is inconsistent.

if we would decide to lift the requirement, then I believe the compilation should still be deterministic, so the result should be the same, regardless of which .ino file (or the directory name maybe) you specify to indicate the sketch. I think this is also how arduino-cli implements this now.

I'm going to go ahead and close this PR for this reason. I'll add a comment to the issue in a minute discussing alternatives.

@per1234 per1234 added feature request A request to make an enhancement (not a bug fix) Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature labels Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request to make an enhancement (not a bug fix) Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Projects
None yet
3 participants