-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Autoupdate language server version #76
Comments
Personally, auto-updating/installing packages behind the scenes feels way way too surprising for my taste, e.g. (as a conda user) if the update suddenly pulls in more dependencies via pip that are available via conda and should be installed via conda. A notification/warning is fine, but where and when and how a package is updated should be the sole responsibility of the user. |
I understand but you have to also consider, how difficult and time consuming it is for us (me, since there is no one else developing
In VS Code you should not be using FORTRAN Intellisense anymore. It is redundant, the Modern Fortran extension should be enough. Moreover, one of the features of
Although that is an option most language servers employ a similar autoupdate technique. It shouldn't matter to the user what version your language server is. There are a lot of arguments to be made on this. I am more than willing to have a discussion on the matter, see how the users feel and if so revert the auto-update feature. |
Ah, thanks, I was not aware that that extension was made redundant, at some point in the past I installed both -- Thanks!
Ah, good to know. From the documentation I infer that this file has to reside in every project I use fortls on, as it does not search e.g. upwards in the directory hierarchy, or in the home directory if no config file is found in the root dir. Is that correct? Also fwiw, "Options defined in the configuration file have precedence over command line arguments." is, in my experience, basically the opposite behaviour of most tooling (linters, etc) I'm using, where the precedence is defaults < config file entry < command line switch. Otherwise, it's impossible to temporarily override undesired behaviour without code changes. |
I fully understand, being in a similar boat; only supporting the latest version is quite natural. However, consider that auto-updating with pip means that for users having installed fortls via conda, this will replace the conda version with a version from pypi, and crucially, will also install any new dependencies via pip instead of conda. This means that the environment (maybe even the base env) slowly becomes a mix of pypi and conda packages, a situation you want to avoid as much as possible, and would normally mitigate by installing as many dependencies as possible via conda before doing a (manual) pip install. |
Lacking a notification method that the users would see (because it's hidden in some editor log, I guess?), fortls could error out with a descriptive error message when it hits that "have to update" codepath - that would normally be surfaced by editors, I think. |
I agree but there is a reason for that.
tbh I don't see a problem with that, but I also don't want to change people's conda envs. What I think I can do is detect if we are in a conda environment and if so just show a notification.
I think we can do that. We can generate a pop-up message and even display options for the user to select. The only problem is getting the response from these options. |
Understood. It's great that this is specifically called out in the docs!
Sounds good!
Do you necessarily need to "get" a response? If you error out with "fortls is outdated, please update it!" and the user updates fortls (using pip, conda, apt-get, msys-pacman, or whatever they are using), would that be sufficient (as the error would not re-appear)? |
Because fortls is used by multiple editors, it is the client's responsibility to have the latest version of
fortls
, however this creates a problem on our end. Users end up with outdated versions due to the client implementation not having a way to notify the user.I think during initialisation we should check PyPi and if our version is older than that in the repo we should download the latest.
This should also minimise the maintenance of multiple versions since users will always be running the latest fortls version.
A flag should be added to disable this auto update in case new versions introduce breaking changes, but I would highly recommend against enabling that option.
The text was updated successfully, but these errors were encountered: