Skip to content
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

Closed
3 tasks done
lafrank opened this issue Mar 12, 2023 · 3 comments
Closed
3 tasks done

Include a solution/project file #1952

lafrank opened this issue Mar 12, 2023 · 3 comments
Assignees
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@lafrank
Copy link

lafrank commented Mar 12, 2023

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

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@lafrank lafrank added the type: enhancement Proposed improvement label Mar 12, 2023
@kittaakos
Copy link
Contributor

Thanks for taking the time and submitting this enhancement ticket.

A multi-file arduino project is impacted by current implementation of how INO files are concatenated to form a single code space.

What do you mean by current implementation? Here is the specification on how the builder API transforms the sketch files (.ino) into one single .cpp file. The sketch file concatenation is deterministic and is not an arbitrary "current" implementation-dependent logic.

A descriptor file should be included with the proejct - just like sln or proj files for Visual Studio - to describe dependencies.

Please elaborate on what dependencies should be declared in this file.

Such a descriptor file would be a great achievment to have control over files arbitrarily dropped into a folder.

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!

@kittaakos kittaakos added the status: waiting for information More information must be provided before work can proceed label Mar 14, 2023
@lafrank
Copy link
Author

lafrank commented Mar 14, 2023 via email

@kittaakos kittaakos removed the status: waiting for information More information must be provided before work can proceed label Mar 15, 2023
@per1234 per1234 self-assigned this Feb 11, 2025
@per1234 per1234 added the topic: code Related to content of the project itself label Feb 11, 2025
@per1234
Copy link
Contributor

per1234 commented Feb 11, 2025

Thanks for your suggestion @lafrank.

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)

This would be a fundamental change to the Arduino sketch format. We need to consider the entire ecosystem, which includes multiple development tools and tool versions. If we implemented such a change in Arduino IDE only, this would result in the creation of sketches that are incompatible with other tools and even versions of Arduino IDE.

In addition, we need to consider beginner friendliness. The system you propose significantly increases the complexity of what is currently a fairly intuitive system (all code files shown in the IDE are part of the program and concatenation is done in the same order as the editor tabs).

We have decided that the benefits of the proposal don't outweigh these harmful effects so we are declining it.

For simple project where you want to break the sketch up into a few .ino files, the technique you described of using prefixes on the additional .ino files to influence the order of concatenation will be fine.

For more complex projects, the code should be separated into .cpp and .h files, as you described. No concatenation is done on these files, so the sketch developer is free to name them as they like.

avoid situations where a file is copied to a project folder accidentally

Based on over a decade of supporting Arduino users, I don't think it is a common problem. And the type of user who is incautious enough to accidentally copy code files into their sketch is likely to be the same type of user who would not use the advanced system you propose.

Rather than us providing a workaround to allow such sloppy project management, it will be better for the user to simply remove the unwanted file from their project.

A descriptor file should be included with the proejct - just like sln or proj files for Visual Studio - to describe dependencies.

The ability to manage dependencies on a per-sketch basis is something that would be very beneficial, and is much requested. However, since this was not the primary focus of your request, I'll close this in favor of another issue that we are using to track that request: #2573

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
@per1234 per1234 added the conclusion: declined Will not be worked on label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants