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

Development version #293

Merged
merged 46 commits into from
Apr 22, 2022
Merged

Development version #293

merged 46 commits into from
Apr 22, 2022

Conversation

gnikit
Copy link
Member

@gnikit gnikit commented Nov 17, 2021

The helper.ts file was cluttered, filled with routines and variables
that belonged to the tools file. This have now been moved.

In addition, the old interface with the language server has been removed
in preparation for the new interface that will be added.

Changes

  1. Adds support for multiple compilers gfortran, ifort (flang in the future)
  2. Adds direct interface with fortls therefore eliminating the need to use FORTRAN Intellisense
  3. Fixes some linting results that were previously uncaught in the linter i.e. compiler errors related to the input arguments/preprocessor and not the standard fortran syntax
  4. Made activation of linter, fortls, formatters to not require a VS Code restart when enabling them in the settings.
  5. Because of 1. and 2. the options of the extension have been rewritten to make configuration easier. Deprecated warnings have been added to the old arguments
  6. Updated the extensions logo, and README (@krvajal not sure if a GIF at the top is the way to go, what do you think?)
  7. Added cache when evaluating linter args since the include paths can get expensive to get compute
  8. added unittests for both the linter regex and the linter diagnostics
  9. Added bundler (webpack) now are install archive should be much smaller
  10. Fixes Using formatter findent with format code on save produces error "Failed to save" file #364
  11. Fixes forts missing warning disables fortls parsing if fortls is installed  #365
  12. Fixes Formatter and Fortran Server do not install #354

TODO:

  • Update fortls interface settings, e.g. fortls.preserveKeywordOrder has been deprecated so remove and replace with sort_keywords
  • Unittest the fortls trigger bit Tracked in Unittest Language Server spawning #422
  • Unittest the formatters interface, e.g. that we can actually call a formatter. We will need to call pip before that or force the selection of the option through Mocha. Tracked in Unittest formatting #423
  • Merge all intrinsics to a single json file Tracked in Merge intrinsics into a single json #424
  • Add snippet for extension setup
  • Restarting server does not discard previous instance Tracked in Language Server start, stop, restart commands #425
  • Remove the PREPROCESSOR linter regex. They produce warnings for for standalone files, think of include 'somefile'
  • Activate the extension always

@gnikit gnikit changed the title Rearranges routines from helper to tools Development version Nov 17, 2021
and adds support for gfortran and ifort compilers

Fixes Rewrite settings interface #292
Fixes Add support for Intel and LLVM compilers #291
Fixes gfortran linter regex cannot display certain failures #295
Also adds output on successfull install.
There is still a problem with the install tool returning a promise
that is being fullfied after we have executed the formatter
(that is if the tool is missing) which results into the user having
to call the formatter twice to format the document.
Cache the results from include directory path resolution and glob
pattern matching to save on compute.
- Symbols are always turned on through `fortls` so now the options
  are to use the `fortls` symbols or `fortls` + `Built-in` i.e. `Both`
  which does not make much sense but some people might end up using it.

-  Added the `-f(free|fixed)-line-length-<n>` arguments to be
included automatically when when the `fortran.fortls.maxLineLength`
is specified.

- Added the flag for Intel's preprocessor `-fpp` to be included
  automatically.
Not sure if that has any real impact on performance.
Fixes Convert extension to async #285
Tests have been added for both the regex matches and specific groups but
also for the diagnostics array that is fed into VSCode
@gnikit
Copy link
Member Author

gnikit commented Nov 26, 2021

One of the issues I have noticed with this PR while using the dev branch for my work, the linter tries to lint header files and gfortran really does not like that

Also fixes forts missing warning disables fortls parsing if fortls is installed  #365
and adds more options for configuring the options through the UI.
Closes Formatter and Fortran Server do not install #354
This is a proper async implementation of the formatting interface for
simple edits. It can be extended to ranges as well, with minimal code.

Closes Using formatter findent with format code on save produces error "Failed to save" file #364
@gnikit gnikit linked an issue Jan 26, 2022 that may be closed by this pull request
@gnikit gnikit merged commit 91f3844 into master Apr 22, 2022
@gnikit gnikit added this to the v3.0 milestone Apr 27, 2022
@gnikit gnikit deleted the dev branch October 6, 2022 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment