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

Add a new sketch subcommand to retrieve build-related information #2866

Open
3 tasks done
kittaakos opened this issue Mar 13, 2025 · 0 comments
Open
3 tasks done

Add a new sketch subcommand to retrieve build-related information #2866

kittaakos opened this issue Mar 13, 2025 · 0 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Milestone

Comments

@kittaakos
Copy link
Contributor

Describe the request

Please consider adding a new subcommand for sketch to expose certain build-related information, including the build_path of a given sketch.

The primary motivation for this request is to allow clients of the CLI to access information related to the build path without needing to reimplement the CLI's logic for calculating the build folder path or compiling the sketch. The build folder name is derived from the sketch folder path, which can vary across different operating systems and configurations. It's fragile to reimplement it.

For instance, the CLI may generate paths that differ by case sensitivity on Windows (e.g., c:\ vs C:\) or encounter issues with the 8.3 filename convention. Similarly, on macOS, two different paths may point to the same directory due to symlinks.

Proposed Behavior:

  1. The command should return the build path for a sketch, even if it hasn't been compiled yet.
  2. It would be helpful to include metadata about the build, such as contents from build.options.json, if available.

This feature would improve the usability of the Arduino CLI, especially for developers looking to optimize their workflows.

Thank you for considering my request!

Describe the current behavior

It is not possible to retrieve the build_path of the sketch without compiling the sketch.

Arduino CLI version

1.2.0

Operating system

macOS

Operating system version

15.3.1

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@kittaakos kittaakos added the type: enhancement Proposed improvement label Mar 13, 2025
@alessio-perugini alessio-perugini added this to the v1.3.0 milestone Mar 13, 2025
@per1234 per1234 changed the title [feature-request]: Add a new sketch subcommand to retrieve build-related information Add a new sketch subcommand to retrieve build-related information Mar 19, 2025
@per1234 per1234 added the topic: code Related to content of the project itself label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants