* Prepare release 2.9.0.0
* Bump 'bytestring' version for release CI test scripts
The older 'bytestring-0.11.1.0' version doesn't compile with the recent
GHC 9.10.1 release. Bump the version to '0.12.1.0' which can be
successfully compiled on all supported GHC versions.
* Update supported GHC version table
* Move plugin ghc support conditionals into .cabal file
Having them in the cabal.project file is a very neat way to
enable/disable a plugin, but it negatively affects Hackage users as they
can no longer trivially install HLS from Hackage.
This discussion might be revisited in the future, but not during a
release process.
* Disable tests and benchmarks in release test pipeline
On some platforms, building bytestring-0.12.1.0 is not fully supported
yet. Hence, we disable tests and benchmarks, to allow building on the
platform Windows with GHC 9.10.1.
* Always show debug output in release test ci
* Upgrade cabal version in the release pipeline
* Switch to `text` for release test package
---------
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Support for 9.10
This includes supports for all plugins, other than formatters and hlint.
We need ghc-exactprint and retrie release before merging this.
* Remove indexed-traversable allow-newer
* Fix couple of warnings
* Fix flags job for hls-graph
* foldl' exposed from Prelude since base 4.20
* Fix flags job for hls-plugin-api
* Fix ghcide hover test
* Fix flags job for hls-eval-plugin
* unzip since 4.19
* More pedantic fixes
* Don't CPP in tests, fix another test
* Switch to ghc-exactprint and witherable from hackage
* Fix all warnings in hls-refactor-plugin
* Remove more no longer necessary allow newers
* Fix all warnings in hls-gadp-plugin and hls-qualify-imported-names-plugin
* Remove allow-newer for boring
* Bump to lsp 2.6, remove more allow-newers
* outline tests
* disable simple plugin on 9.10
* Remove allow-newer for ghc-trace-events
* fix appendConstraint
* stylish
* Remove commutative-semigroups and monoid-subclasses from allow-newer
* Remove free from allow-newer
* Fix 'type wilcard actions' tests
* Remove hie-bios from allow-newer
* Fix suggestNewDefinition tests
* Revert "Fix suggestNewDefinition tests"
This reverts commit 2f3300e964.
* Remove makeDeltaAst breaking tests unrelated to addArgument
* Fix 79 code action tests
* Fix 12 more tests
* Remove co-log-core from allow-newer
* Fix 21 more tests
* Fix 8 import disambiguation tests
* fix windows ghcide tests
* Fix adding argument to function body
* update retrie commit, progress in add argument tests
* Fix few stylish-haskell parse errors
* Fix remaining redundant constraint tests
* Remove allow-newer for constraint-extras
* Fix warnings after master merge
* Fix most add argument tests except for one
* Remove dependent-map from allow-newer
* Try removing some allow-newers from lsp
* Ormolu is updated, add links for other tool dependencies
* Revert "Try removing some allow-newers from lsp"
This reverts commit 6f60029ff2.
* Try this
* Fix all gadt plugin and most class plugin tests, enable 2 tests for ghc 9.4+
* Undo spurious changes
* Update eval plugin tests
* Disable broken refactor plugin test for now
* Fix warnings
* Add source-repository-package to unblock floskell
* Make call hierarchy plugin tests green
* fix semantic tokens 9.10
* Fix remaining class plugin test
* Update hls-change-type tests
* Make class plugin more robust
* Fix stylish parse errors, simplify CPP
* Cleanups
* Remove retrie dep from hls-refactor-plugin
* More retrie fixes
* Fix cabal-plugin-tests by respecting maxCompletions client cfg + a bit of CPP
* Fixup ghcide-tests
* disable retrie, splice and floskell plugins for 9.10
* Update tested-with + fix import warning
* Fix stylish
* Fix compilation with 9.2.8, fix stack jobs
* Remove no longer relevant :type +v test
* Disable tests of disabled plugins in CI
* Try a better broken specifier?
* Fix invalid CI config
* Use getClientConfigAction instead of introducing new HandlerM action
* Move CPPd imports to prevent stylish from evaluating CPP
* Disable stan tests with ghc 9.10 in CI
* attempt fixing exactprint <9.10
* Try enabling fourmolu now
* Revert "Try enabling fourmolu now"
This reverts commit 7142686f62.
* Update code-range-plugin tests
* Fix No newline at the end of file
* Use more recent cabal-gild
* Try setting some linker flags for macos
* Ignore non-local variable completion test on windows for GHC 9.8
---------
Co-authored-by: Jan Hrček <honza.hrk@gmail.com>
Co-authored-by: Patrick <fwy996602672@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Fendor <fendor@posteo.de>
* clarify dirty in hls-graph
* fix comment
* hls-graph add `compute` test
* move test to better place
* add detailed test
* fix comment
---------
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
The main problem is the out of sync state in the build system. Several states involved, the shake database running result state for key. shake extra's dirty state for key and shake extra's rule values state.
To stablize the build system. This PR force some of the updates of these state into a single STM block.
1. collect dirtykeys and ship it to session restart directly. No more invalid removal before session restart. Fixing Flaky test failure result in error of GetLinkable #4093
2. move the dirtykey removal and rules values updating to hls-graph by adding a call back fucntion to RunResult. Properly handle the dirtykeys and rule value state after session start and closely followed by another session restart Fixing ghcide-tests' addDependentFile test #4194
3. properly handle clean up by wrapping the asyncWithCleanUp to refreshDeps
---------
Co-authored-by: wz1000 <zubin.duggal@gmail.com>
Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
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.
* Fix warnings in hls-graph, enable pedantic in CI
* Fix build with flags
* stylish-haskell
* Split Key stuff to separate module with explicit export list
* Try the cabal configure suggestion in CI flags job
* Newline fix
* Enable pedantic for all
* Typo
* stylish-haskell
* pedantic is already enabled for all
* Fix error in hls-plugin-api
* Address nitpick, use lsp-types in tests instead
* Merge definitions from all plugins for Document(Type)Definition message
- enables multiple plugins to provide Document(Type)Definition for the same message
* Remove unnecessary head usage in ghcide TestUtils
* Use Nothing for original selection when upgrading Location to LocationLink
in combineResponses of plugins to TextDocumentDefinition message
* Share combineResponses document definition and document type definition tests
* Downgrade locations to links when missing client capability in combineResponses (plugin API)
- Upgrade locations to links only when necessary (some responses are links)
* Test preserving link data in combineResponses of Definition message
* Add haddock to mergeDefinitions in plugin API
* Replace usage of OverloadedRecordDot with lenses
- to support GHC < 9.2
* Add TypeFamilies extension to TypesTests to support GHC < 9.4
* Require focus >= 1.0.3.2 to fix 9.8 build for ghcide and hls-graph
---------
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Prepare release 2.3.0.0
* release ci: respect ADD_CABAL_ARGS on non-windows builds
* release ci: disable simdutf text for centos
* release ci: disable simdutf text for freebsd
* Fix cabal file of hls-fourmolu-plugin to allow it to be uploaded to hackage
Fixes#3819
* Update ghc version support docs
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This simplifies the release process as we can bump all package versions in
lockstep prior to a release instead of having to decide version bumps on a case
to case basis while adhering to PVP.
We don't test arbitrary configurations mixing versions of plugins/ghcide which
you might get if you install HLS from hackage. With this in mind, it makes sense
to pin the versions of all packages in this repository
Exceptions include:
- hie-compat (it is used by hiedb and is mostly separate from the other packages - it changes about once a GHC release)
- shake-bench (not meant to be distributed for users, for internal testing only
* Document exception handling in Actions/Rules
I also took the liberty of removing the `MonadFail` instance for
`Rules`, since failing in `Rules` seems much worse as it won't
automatically be caught. There was only one use of that, which now has
an appropriately threatening comment.
* Tweak
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Drop min_version_ghc (8.8.4 is min supported)
* Drop conditional glasgow_haskell cpp
* Inline some imports (review feedback)
* Drop hie-compat 8.6 (review feedback)
* Dropping more ghc 8.6 related code and docs
* Eval: Include tests that were broken for 8.6
Use hiedb from hackage
gitlab-ci: remove workaround for windows 9.2.2
gitlab-ci: remove workaround for windows 9.2.2
hie-bios
update hie bios
update hie bios
bounds
hie-bios fixes
hie-bios fixes
lsp 1.6
cabal.project fixes
hie-bios fixes
lsp and hie-bios from hackage
Mark hie-bios error as expectFail
hie-bios fixes
hie-bios fixes
Stack
Stack
stack fixes
All code actions have been moved to hls-refactor-plugin
Mostly straightforward, only slight complication was that completion auto imports
depends on exactprint, but I didn't want to remove all completion logic from ghcide
just for this.
Instead, I added logic to dynamically lookup the plugin that provides
the extend import command, so that auto imports work as expected when you have
hls-refactor-plugin enabled.
Move lookupPluginId out of loop
Replace code actions with lenses in benchmarks
Allow plugins to use GetAnnotatedParsedSource by linking it in when depended on
Move lookupPluginId to IdePlugins
Add default extensions
Move traceAst
Adds a new rule `GetLinkable` which is called on demand by
hscCompileCoreExprHook whenever a linkable is required for a splice.
Adds a MonadUnliftIO instance for Action to faciliate the above
We write Core Files whenever a linkable could potentially be required for a file
(i.e it is in the transitive closure of a module that uses TH/compile time code
execution)
However, we only generate byte/object code when such a linkable is
really required by a splice (i.e. the module is in the transitive closure
of any symbol called from a splice).
No linkables are stored in `HiFileResult`. If a linkable is required, then
it must be obtained via a call to `GetLinkable`.
Also use hashes to do fine grained recompilation checking for TH instead of
mod times. This simplifies recompilation checking quite a bit.
* Collect metrics and expose an EKG server
* register gc metrics locally
* getDatabaseKeys
* fixups
* Abstract monitoring and put EKG behind a Cabal flag
* Add CI for the new flag
* fix double ifdef
* link to GHC docs for eventlogs
* log when stopping the EKG server
* Allow CPP in modules
* Add doc comments
* Apply suggestions from code review
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Compat. with ghc 9.2
* use an ekg-json snapshot that preserves compat. with ghc 8.x
* confine CPP to the EKG module
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* applyWithoutDependency
* delete dead code
* estimateFileVersionUnsafely
For a long time, defineEarlyCutoff has been accessing the Values store directly
to compute GetModificationTime values instead of calling use, breaking the
invariant. The values are used to associate the rule result to a file version,
which gets recorded in the Value as well as used as the key in the Diagnostics
store.
The problem here is that the GetModificationTime rule computes a new version and
mutates the Values store, so if defineEarlyCutoff peeks in the store before
GetModificationTime has run, it will grab the old version. This leads to lost
diagnostics and potentially to misversioned Values
Fixing the problem is tricky, because we cannot simply use GetModificationTime
inside defineEarlyCutoff for all rules. There are three issues:
1. Creating a dependency on GetModificationTime. If everything depends on it,
then we lose the ability to do early cutoff
2. Creating cycles in the build graph, since GetModificationTime has
dependencies itself. Because hls-graph doesn't implement cycle detection (Shake
did), it is a nightmare to debug these cycles.
3. Creating overhead, since GetModification time calls the file system for non
FOIs and in the past this was very expensive for projects with large cartesian
product of module paths and source folders
To work around these I had to introduce a new hls-graph primitive,
applyWithoutDependency, as well as do a bunch of fragile type tests on the key
type to decide on whether to use GetModificationTime or peek into the values
store. The type casts could be cleaned up by introducing a type class, but I'm
not sure the end result would be any better.
To understand the issue and debug the implementation of the fix, I added a
number of opentelemety traces which I'm leaving in place in case they could be
useful in the future.
* Traces for diagnostics
* handle the empty file path
* return Nothing instead of peeking the store