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

Use configuration from sketch project file #2573

Open
3 tasks done
bryceschober opened this issue Nov 21, 2024 · 0 comments
Open
3 tasks done

Use configuration from sketch project file #2573

bryceschober opened this issue Nov 21, 2024 · 0 comments
Labels
type: enhancement Proposed improvement

Comments

@bryceschober
Copy link

bryceschober commented Nov 21, 2024

Describe the request

Sharing Arduino IDE sketches between users is pretty handicapped right now, because the sketch.yaml project file isn't yet supported in the IDE, and there is no way to share the settings that are manually configured in the "Tools" menus. This is in spite of the fact that I've already configured the sketchbook location to the root of my GitHub repository's sandbox.

The first MVP behavior wouldn't even need to support multiple build profiles or provide any additional user interface. It could be as simple as:

  1. If the sketch .ino has a sketch.yaml file next to it, and
  2. if the sketch.yaml explicitly defines a default profile, then
  3. load & save all platform properties to/from the default profile
  4. load & save all board properties to/from the default profile's FQBN
  5. load & save all library installations to/from the default profile

Describe the current behavior

Board Selection

When opening a sketch Arduino IDE does select the board, custom board options, and port according to the selections the user had the last time that sketch was open. However, this data is stored separately from the sketch, which causes two problems:

  • There is no way to share that configuration along with the sketch
  • If the path of the sketch is changed, the configuration data is disassociated from the sketch (the data is keyed to the sketch path)

Dependencies Management

Library and platforms can only be managed globally. There is no way to control dependencies on a per-sketch basis.

This results in the frustrating situation where a working project can be broken at any time simply by installing a library for use with another project.

The users must resort to inefficient and complex measures to control dependencies. For example, they may vendor library dependencies inside the sketch, which may require modifications to the library source code and makes updates inconvenient.

Per-sketch dependencies management is also the root motivation for the majority of the many users passionately requesting the implementation of a portable mode (#122). For most applications, use of a portable IDE installation for project dependencies management is inferior to the build profiles system, so assuming the effort for this proposal is approximately equal or lesser, the finite development resources would be more effectively investing into adding support for build profiles than to implementing portable mode.

Arduino IDE version

2.3.4-nightly-20241120

Operating system

All

Operating system version

Any

Additional context

Additional requests

Related

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
@bryceschober bryceschober added the type: enhancement Proposed improvement label Nov 21, 2024
@per1234 per1234 mentioned this issue Nov 27, 2024
3 tasks
@per1234 per1234 changed the title Support sketch.yaml for IDE board configuration and Libraries Use configuration from sketch project file Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

1 participant