-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
Include a solution/project file #1952
Comments
Thanks for taking the time and submitting this enhancement ticket.
What do you mean by current implementation? Here is the specification on how the builder API transforms the sketch files (
Please elaborate on what dependencies should be declared in this file.
What do you want to control here? Can you tell us more about your use case? What drop-in files are you referring to? What problem would it solve if the sketch file concatenation could be controlled with such a project file? Thank you! |
Thanks for looking into this topic and sorry for ambiguity, let me clarify shortly.
At the moment - to my knowledge - the builder is enumerating and concatenating INO files in the given folder alphabetically, based on the file names. For this very reason, I have seen multi-file projects where INO file names are prepended with a_, b_, c_ etc, just to tell the builder the order, which is obviously not too elegant and also confusing.
What I am suggesting is to have some sort of a project file, which. at its very basic implementation serves two purposes:
1 : list the files that is considered the part of the project, eg: what the builder should enumerate
2 : determine the order of these files (build-order)
It is common to some other languages too, that a folder content and folder hierarchy within is considered to be the metadata used to organized files into namespaces, and also assuming that all files is also part of the project. While this approach looks straightforward for the first glance, but it is causing portability issues and file system dependency.
Declaring the source files that contributes to the project has also the advantage to avoid situations where a file is copied to a project folder accidentally, and the builder - assuming the file belongs to the project - includes it, causing headaches later.
So what I am suggesting instead is a simple (Json, xml, whatever) project file to fully decouple logical structure of a project from the file system structure.
With Arduino IDE 2.0, the only viable option for a multi-file project is as follows:
- separate the project to multiple header files (with the implementation, too), each spanning a single logical code domain,
- add a dummy INO file which only has the includes *in the right order (isn't it the project file actually :-) ?)*
Thank you.
|
Describe the request
A multi-file arduino project is impacted by current implementation of how INO files are concatenated to form a single code space.
A descriptor file should be included with the proejct - just like sln or proj files for Visual Studio - to describe dependencies.
Such a descriptor file would be a great achievment to have control over files arbitrarily dropped into a folder.
Describe the current behavior
INO files in a folder concatenated in alphabetical order.
Arduino IDE version
2.0
Operating system
Windows
Operating system version
10
Additional context
For reference, have a look at Visual Studio (not VS Code !) project and solution files architecture.
Issue checklist
The text was updated successfully, but these errors were encountered: