phantom depencies is invoke becase dependencies have preconditions in rules, see #3423. This pr is intend to fix that.
This might also fix some of the flaky tests.
In favor of @wz1000 appoach of running deps linearly.
It modify the deps result from KeySet to [KeySet] to make sure the result is sorted
we initialy thought it would have performance impact on the build system. But it turns out instead of performance lost, we actaully have performance gain since it avoid building the phantom depencies.
Overall things have been done:
1. Fix up hls-graph phantom depencies issue by reflesh linear deps in a linear manner.
2. Add semantic tokens bench mark.
3. Add test to hls-graph to ensure phantom depencies would not be invoke.
Result:
Now no more phantom dependencies would be invoked in hls-graph, gaining correctness, less runtime and less mem usage at the some time.
* Add cabal-gild as a cabal file formatter plugin
* Add support for multiple cabal formatters
In addition, allow different cabal file formatter provider to specify an
explicit file path, instead of searching only on $PATH.
* Fix cabal formatter test flags
* hls-notes-plugin: Initial implementation
* hls-notes-plugin: add to feature list and plugin table
* hls-notes-plugin: Add more documentation comments
* hls-notes-plugin: Fix tests after #3846, add CI job
* hls-notes-plugin: Address review comments
* hls-notes-plugin: Allow Note definition within single line comments
* hls-notes-plugin: Improve "Note not found" error message
* hls-notes-plugin: Allow single line notes to be indented
* treewide: Add missing underscores to note definitions
* hls-notes-plugin: Wait until HLS is done in tests
* hls-notes-plugin: Fix tests on windows
The regex did not allow windows line endings in note definitions
---------
Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
Fix bench for newer ghc versions
The following have been done:
1. No longer use the implicit-hie to generate the hie.yaml for the bench examples and in favor of using "cradle:\n cabal:\n", seems to be working with modern cabal.
2. upgrade benchmark to use 9.6, 9.8 (The latest two we support for now).
3. upgrade bench examples to `Cabal version: 3.10.2.1, lsp-types version: 2.1.1.0`
4. fix minor error that `*.hp` files duplicates its extension name
---------
Co-authored-by: fendor <fendor@users.noreply.github.com>
* Remove bitrotted CPP gated code
A lot of the HLINT_ON_GHC_LIB gated code has been bitrotting since this
flag was removed. This could be reintroduced if we wanted to directly
work on the same parsed AST, but as the hlint ghc plugin showed this
may not make much difference: https://www.haskellforall.com/2023/09/ghc-plugin-for-hlint.html
* Reintroduce ghc-lib flag for hlint plugin
The ghc-lib flag was removed in haskell#3015, but it's still useful to
be able to compile hls-hlint-plugin using the GHC API if you've done so
for hlint and ghc-lib-parser-ex, rather than using ghc-lib-parser as it
simplifies the build and dependencies.
Even though we copy test files into temporary directories, we used to
reuse the same cache directory for build artefacts, hiedb and
compilation artefacts. While there is practially no chance this causes
any issues for the test runs themselves, it litters the cache directory
with a lot of files. So, we create one main directory in the temporary
directory, and generate all caches and in there. This makes it trivial
to delete all test caches, without risking deleting the cache that is
still used.
* Exit with non-zero exitcode if wrapper fails to launch
Only when in LSP mode, we want to launch the LSP server that offers the
restart capability.
* Install recommended GHC version for release wrapper tests
---------
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Remove more workarounds for GHCs < 9.0
* String, not [String]
* Remove GHC810 and GHC90 enum constants
* Fix logic mistake in windows tests
* Inline thDollarIdx
* Troubleshoot wrapper-test
* Troubleshoot
* Try free disk space action
* Run free-space in individual test jobs
* Only run the disk cleanup on ubuntu
* Revert troubleshooting code
* Revert free-disk-space workaround
* Reintroduce workaround
* Revert "Reintroduce workaround"
This reverts commit ec6e8da8c44d0130f0c23aac75df5e461c8f88e2.
* Don't install stack in tests?
* Revert "Don't install stack in tests?"
This reverts commit f53e9932f60eb6789ddef12f370ef81acf65fc58.
* Make the test use ghcup-managed stack
* More maintainable version of stack test
* Use *only* incoming range to determine which code actions are in scope
Rather than doing a full compare with incoming `Diagnostic` objects from
the client. This brings the "remove redundant imports/exports" code
actions more in line with behavior described in #4056, and has the
pleasant side-effect of fixing broken code actions in neovim (#3857).
* Remove redundant imports ;)
* Rename param for clarity
---------
Co-authored-by: fendor <fendor@users.noreply.github.com>