-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Added fortls autoupdate during initialisation #75
Conversation
The server will ping PyPi and check if a version is available greater than the currently installed version. If an old version is detected fortls will download the new version to the pip localtion of the current Python distribution. This should allow for fortls to be correctly installed most times. Obviously if running from a directory structure that does not adhere to how pip/conda install packages this might not work.
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
==========================================
+ Coverage 81.71% 81.73% +0.01%
==========================================
Files 9 9
Lines 4338 4368 +30
==========================================
+ Hits 3545 3570 +25
- Misses 793 798 +5
Continue to review full report at Codecov.
|
@gnikit I disable update check for tests for networkless
but I also would like to disable it for package installed into system directory too. |
Sorry I missed this @band-a-prend, I cannot in good consciousness recommend this, since historically it leads to people opening reports for already resolved issues simply because they run an outdated version of fortls, which ultimately increases the maintenance work for us. I don't see why you would want to run the dev tests in a networkless environment, the only reason to do that is if you want to contribute to fortls which you can easily do with 2 clicks in a browser using GitHub CodeSpaces. |
This is just a specifics Gentoo Linux packaging process when tests are ran in networkless sandbox env to be sure of it's reproducibility, have no side effects, dependence of external service availability etc... and to posibility run tests on isolated systems without internet connection. I will try to avoid store outdated versions in repository. I assume even if fortls unable to update due to permission restriction of system directory there will be no problems for further processing. |
This will potentially come back to haunt me but if you want to disable fortls version checking you can create a patch removing or constantly evaluating the if-conditional to False here: Lines 203 to 207 in 833755e
One of the interface tests would fail in such an environment, because it actually tests the PyPi metadata fetching mechanism, but that shouldn't matter for Users, and yes you are correct, if internet access is missing or inadequate permissions are present, fortls will carry on. |
The server will ping PyPi and check if a version is available greater
than the currently installed version. If an old version is detected
fortls will download the new version to the pip localtion of the
current Python distribution.
This should allow for fortls to be correctly installed most times.
Obviously if running from a directory structure that does not
adhere to how pip/conda install packages this might not work.