[ ] Tests for the changes have been added (for bug fixes / features)
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.)
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 fullarduino-cli
andclangd
executable paths, and thearduino-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 toarduino-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.)