Skip to content

Automatically detect the path of clangd, arduino-cli, and its configuration #115

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

Merged
merged 3 commits into from
Jun 20, 2022

Conversation

joewreschnig
Copy link
Contributor

Please check if the PR fulfills these requirements

Tests have not been added because I don't see any tests for command option handling in the existing code.

What kind of change does this PR introduce?
Better out-of-the-box configuration by default.

What is the current behavior?
arduino-language-server always requires providing full arduino-cli and clangd executable paths, and the arduino-cli configuration file path, even though these may vary across systems. This makes them difficult to include in project/editor configuration which is the same across systems.

What is the new behavior?
There should be no differences in behavior for successful runs.

Previously failing commands may now be successful if everything can be autodetected, along with printing a log message saying so.

Error messages will be different for failed runs when a configuration file is provided but arduino-cli could not be detected - previously it would ask for a daemon address, now it will ask for a path to arduino-cli.

Other information:
I've split the PR into separate commits for searching $PATH vs. finding the configuration file as they may have different issues to discuss. (Or if there is a better / more thorough way of finding the default configuration file I'm not aware of.)

@CLAassistant
Copy link

CLAassistant commented Jun 18, 2022

CLA assistant check
All committers have signed the CLA.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 18, 2022
@cmaglie cmaglie merged commit 7fc6ab3 into arduino:main Jun 20, 2022
@cmaglie
Copy link
Member

cmaglie commented Jun 20, 2022

Thank you!

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

Successfully merging this pull request may close these issues.

4 participants