* 9.6 support
Fixes
hls-refactor-plugin 9.6 support
hls-gadt-plugin
Fix 9.4 build
Fixes
hls-gadt-plugin fixes
WIP 9.6 patches
fixes
fixes
fixes
fixes
fixes
Fixes and add CI
CI
CI fixes
patch haskell/actions for https://github.com/haskell/ghcup-hs/issues/783
CI fixes
CI fixes
CI fixes
CI
CI
CI
CI
CI
Fix build on 9.0
Fix build on 9.0
hls-splice-plugin 9.6 compat
fixes
fixes
fixes
fixes
Fix benchmark build errors
9.2.5 and 8.10.7 had build errors when running benchmarks due to `mfsolve`
test suite having duplicate instances, so stop building tests for
mfsolve (see: https://github.com/kuribas/mfsolve/issues/8). Also,
`http2-4.0.0` has a parse error due to a misplaced haddock comment that
causes build failure with `-haddock`. It is fixed in the latest commit
of the source repo, so use that in the `cabal.project` for now.
Checkout correct commit on `pull_request` in CI
By default, the `pull_request` event has a `GITHUB_SHA` env variable set to the
"last merge commit on the GITHUB_REF branch"
(see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request).
But we want to check out the latest commit on the branch whether or not it is a
merge commit. This commit changes the CI actions to do just that.
fixes
Use head.hackage for 9.4
Only use head.hackage for 9.5 and up
Reverts the change that caused head.hackage to be used for 9.4 as
well
Reintroduce source-repo-package for ekg-json
Fix refactor plugin tests
Fix missing constraint detection in refactor plugin
ghc 9.6+ allow newer unordered-containers:template-haskell
Some refactor tests no longer broken for 9.2
Fix simple-multi-test on 9.6
Mark simple-plugin as broken on 9.6
func-test fixes
Disable unsupported plugins on 9.6
Eval plugin fixes
Eval plugin test fixes, debug output in CI script
Restore 'working' setup/actions
WIP Fix GHC prerelease windows install
Fix eval plugin T11
fixes
Eval plugin fixes
Fix splice plugin test
Mark `simple plugin` ghcide test broken on 9.6
fixes
fixes
Use GHC 9.6-rc1 in CI
Try using 9.6.1 for CI
* 9.6 nix
* Remove head.hackage
* fixes
* fixes
* fixes
* fixes
* fixes
* fixes
The plugin was implemented by calling "load" which circumvents all of
HLSs caching mechanisms for interface files and linkables. Instead we
should work like the other typechecking functions which get all the
stuff we need using HLS rules and setup the HscEnv with all the state in
the right places.
The key part to this is setting up all the HPT modules with linkables if
they are depenedencies of the module we are trying to run a function
from.
- ban load functions from GHC driver
- Enable CI for hls-eval-plugin and fix a bug due to clearing of mi_globals
* Bump versions and add changelogs for 1.9.1.0
* Fix build on windows by disabling ghc-check pkg ABI check
---------
Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Set buildable on GHC 9.4
* Start work on GHC 9.4 compat
* Use patched `retrie`
* update retrie with github address. circumvent nix-prefetch-url.
* handle ExactPrint
* fix ghc 9.0 env.
* unwrap big CPP conditional for GHC 9.4
* GHC 9.4 buildable by disabling a few suggest.. functions
* enable disabled suggest...!
* hls-fourmolu-plugin is buildable
* hls-splice-plugin is buildable
* hls-hlint-plugin is buildable
* Enable plugins on GHC 9.4
* Add fourmolu for GHC 9.4
* fourmolu tweawk
* Fix `hls-hlint-plugin` build
- Build against GHC 9.4 API
- Increase upper bound on `hlint`
* Fix build of `hls-splice-plugin`
* annotation on close parenthesis. still need more work.
* found where closing parenthesis were missing
* examine internal annotation information.
* make use of makeDeltaAst. This fixes most of test failures in GHC 9.4
* remove dead code
* update apply-refact and hlint deps
* temporarily comment out hls-fourmolu-plugin.
* comment out build-tool-depends. then hls-fourmolu-plugin build succeeds with cabal v2-build
* remove unused fourmolu flake inputs
* fix ghc 9.0 build again.
* hlint and fourmolu for GHC 9.2!
* fix mistakenly overriden nix exp.
* remove unused hlint-3.3.6
* Fix CPP in hls-refactor-plugin
* Fix build error in hls-refactor-plugin
* Fix import
* Use `showErrors` instead of `showBag`
* fix initialization test error in refactor plugin.
* alternateNumberFormat and explicitFixity don't build on GHC 9.4
* force demoteIfDefer = id in typecheckModule for GHC 9.4.
* ignore tests which were already ignored with GHC 9.2
* fix extractDoesNotExportModuleName for GHC 9.4 by adjusting regex match
* use makeDeltaAst in removeRedundantConstraints
* fix addTypeAnnotationsToLiteralsTest
* Revert "alternateNumberFormat and explicitFixity don't build on GHC 9.4"
This reverts commit 4903092780031fb400b28f1e9ce696f1057855d8.
* Update flake lockfile
* Use upstream `retrie`
* Use upstream `retrie`
* Update lockfile
* Use upstream fourmolu
* fix arrow annotation on ghc 9.4
* fix flake.nix issue
* revert demoteIfDefer change for GHC 9.4.
* fix hls-splice-plugin build on GHC 9.0.2
* disable tracy on darwin.
* disable fourmolu plugin and ekg-json for now.
* fourmolu update to 0.10.1.0
* build fix for hls-refactor-plugin after merge
* update index-state.
* downgrade fourmolu to 0.9 for ghc 9.2 and 9.0
* remove unnecessary problematic Cabal-syntax dependency.
* update Cabal for ormolu in ghc 9.0 nix env.
* use custom apply-refact for now for both ghc 9.2 and 9.4
* added ghc >= 9.2 condition
* fix fourmolu with -f-fixity-th in nix env
* limit implicit-hie < 0.1.3
* add fourmolu back to build-tools-depends
* mark GHC92-failing tests to be failed on GHC 9.4
* ci failure test
* bump nix file.
* disable cachix action
* further comment out
* revive cachix action.
* remove commented-out
* fix hls-cabal-plugin by removing Cabal-syntax.
note that this is an opposite to #3383, to prioritize CI fix first.
* limit implicit-hie < 0.1.3
* added a small comment and link to the issue.
* put implicit-hie to ghcide dep
* update apply-refact rev
* use apply-refact-0.11.0.0 on hackage.
* 9.4 support for gadt and retrie plugins
Co-authored-by: Ian-Woo Kim <ianwookim@gmail.com>
Co-authored-by: Gabriella Gonzalez <gabriella@mercury.com>
Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
* Support initial generic config for plugins
This enables opt-in plugins, i.e. plugins that are not enabled by default
* Support initial generic config for plugins
This enables opt-in plugins, i.e. plugins that are not enabled by default
* Address review comments and remove optionality in configInitialGenericConfig
I can't remember why this was optional in the first place, which probably means no good reason for it to be
* use defConfig instead of def
* test
* descriptor is the golden source for plugin default configs
Read plugin defaults from plugin descriptor instead of copying into initial config
This is less fragile as now the initial generic config specified in the plugin
descriptor is enforced by construction.
The downside is that now the descriptor is needed to parse the config, which
means a few places where a plugin id was enough now require a plugin descriptor,
which is much harder to get. We paper over this by moving these call sites to
the Action monad.
* redundant import
* simplify
* Build fixes
* Build fixes
* pedantic fixes
* Add CI flows for GHC 9.2.5
* Prefer GHC 9.2.5 over 9.2.4
* Update list of tested-with GHC versions, as we only *test* 9.2.5
* Add GHC 9.2.5 as a supported GHC version
* Update comment in cabal-plugin about disabled test-case
* Disable GHC 9.2.5 on windows
* Fix CI for windows
* Run tests on windows for GHC 9.2.4
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* Extract cabal plugin in its own package
* hls-cabal-plugin: Add plugin
Add golden parse test for test/testdata/simple.cabal
Add module Ide.Plugin.Cabal.Diag
Also: add -Wall
Add parseCabalFileContents
Use VFS for cabal file contents
Diagnostics
* Parse and display Errors
* Parse and display Warnings
Code Actions
* Code Action for License Field
* Add CI workflow
* Add test-suite for hls-cabal-plugin
* Fix various cabal issues
* Update Codeowners file for hls-cabal-plugin
* Document Bytestring is UTF-8 encoded
Co-authored-by: Julian Ospald <hasufell@posteo.de>
* Remove code duplication
* Add cabal files of interest and kick function
Configure a "kick" function for cabal files that is run when the shake
queue needs to be restarted.
Copy pastes from ghcide and 'files of interest'. Maybe more abstraction
needed.
* Add more documentation
* Mark flaky test-case as flaky with issue ref
* Make fendor the only CODEOWNER for hls-cabal-plugin
* Add missing extra-source-files for hls-cabal-plugin
* Add proper CHANGELOG entry for the first version of hls-cabal-plugin
* Add support for Cabal 3.8
* Set diagnostics source to cabal
* Remove unused function
* Add unit tests for code action utilities
* Remove overly specific logging of diagnostics from hls-cabal-plugin
* Improve logging for Cabal FOIs
* Add Range manipulation functions
* Use Range manipulation functions from hls-plugin-api
* Add more documentation for crucial shake restart function
* Add hls-cabal-plugin features to features.md
* Re-use existing GetFileContents rule
Co-authored-by: Fendor <power.walross@gmail.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: Julian Ospald <hasufell@posteo.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add hls-cabal-fmt-plugin to hackage release CI script
* Add cabalfmt common section to HLS
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Add plugin for formatting cabal files using cabal-fmt
* Add 'isolateTests' cabal flag to make plugin install cabal-fmt
For CI, we want to run the tests with a specific cabal-fmt version,
installed automatically by cabal.
However, locally, we might want to test with a locally installed
cabal-fmt version.
This flag allows developers to either let cabal install the
build-tool-depends or install a fitting version locally.
* Ignore failing cabal-fmt test on windows
* Add log message for missing cabal-fmt executable
Co-authored-by: Jana Chadt <jana.chadt@tuwien.ac.at>
Co-authored-by: Fendor <power.walross@gmail.com>
* Initial working version
* Auto-add puns pragma, fix behavior with Hs98 fields
* Patch pragma so it adds NamedFieldPuns instead of RecordPuns
* Refactor big do block
* Make it work with record construction
* Convert to a rule based approach
* Cleanup, remove dead code
* Make it compile with all supported GHC versions
* Add tests
* Minor code reorganization
* Move common pragma logic to same file
* Remove strictness annotations
* Improve documentation
* Use interval map for efficient range filtering
* Add external documentation
* Add tests to GitHub CI
* Add debug log for collected records
* Add `getExtensions` to ghcide
* Indicate that it doesn't work with GHC 9.4
https://github.com/haskell/haskell-language-server/pull/3304#discussion_r1008034647
* Relax version bounds on base
* Add plugin to stack packages
* Add GHC 8.10 support
* Fix GHC 9.4 build failure
* Make `conPatDetails` total
* Revert "Indicate that it doesn't work with GHC 9.4"
This reverts commit 57646d35ad.
* Fix unused import caused by new compat exports
* Fix ConPat construction in GHC 8.10
* Rename test-suite to make it shorter
* Fix nix build by collecting latest hw-prim from Hackage
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
This still makes sure that ghc has been compiled with the same core
libraries as hls while it allows runtime environments where other
packages have been added to the ghc-pkg database.
This commit also adds that file to the sdist, so that distro
packagers can use it.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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
* Update hls-retrie-plugin to be usable with 9.2.4.
This is the first pass at getting hls-retrie-plugin enabled. Much of the
changes were updating to match the changes in the upstream `retrie`
package.
* Replace GHC.Paths.libdir by querying a ModSummary for the LibDir
* Looks like formatting was missed
* Revert "Looks like formatting was missed"
This reverts commit 4f6eee5a6f.
* Don't build retrie for 9.4
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
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
* extract ghcide:experiments-types
* extract haskell-language-server:plugins and let go of examples
The main goal here is to move the Plugins module into an internal
library so that it can be reused from the benchmark suite.
In order to
make that easier, and since they hardly serve a purpose in a repository
with 25 plugins, I delete the Example and Example2 plugin descriptors
and their dependencies.
* HLS benchmark suite
Port the ghcide benchmark suite to HLS and benchmark plugin
"configurations" independently.
This includes the following changes to the ghcide benchmark suite and
HLS:
- Support for "configurations" which are defined as sets of plugin ids.
The benchmark will be run with only these plugins enabled and all
others disabled
- Support for configurable concurrency. This relies on RTS -ol and -po
flags to place the RTS traces in the target location rather than in
the cwd
This change requires two commits, the next one places
ghcide/bench/hist/Main.hs into its final location to help 'git'
recognize the change as a file move
* ghcide/bench/hist/Main.hs -> bench/Main.hs
* CI - fix artifact names for uniqueness
* disable shorten HLS step
* Do not store eventlogs to avoid out of disk space
* render durations up to milliseconds
* shorten titles
Goal is to display the formatted CSV (via column) one row per line
* exclude formatting plugin configurations
* Extract ghcide-bench to a standalone package
* ghcide-bench: fix stderr capturing
* Fix mem stats
We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged.
The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package.
* feedbacks
* delete Example plugins
* init hls-explicit-fixity-plugin
* Update dependencies
* Refactor: Prevent block on startup
* Run pre-commit
* Compatibility: Add emptyMessages
* Remove unused ModIface
* Comment why to make this plugin a lower priority
* Provide hover content while testing fail
* Avoid lambda
* 4 space indent
* Pass Text instead of Name
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* update Gitpod config
* update nix shellHook & docs
* install pre-commit hook
* add kokobd as code owner to .gitpod.*
* add gen-hie to Gitpod
* add tools for doc
* remove .pre-commit-config.yaml from .gitignore
* set vscode formatter to stylish-haskell in Gitpod
* refactor selection range plugin
* refine selection range
* add CodeKind to CodeRange
* rename hls-selection-range-plugin to hls-code-range-plugin
* update docs about selection range
* cleanup RuleTypes.hs
* add the missing bang pattern
* fix subRange
* add some unit tests to CodeRange.Rules
* add tests for removeInterleaving
* add even more tests
* fix extra sources
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Make wrapper a LSP on failure
* Fix incorrect imports
* revert import block for smaller diff
* add missing imports
* Fix: callProcess on win32 machines not called
* import container only on win32
* add missing liftIO
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* hls-haddock-comments does not support ghc-exactprint >= 1.0
And should be marked as such otherwise `cabal install haskell-language-server` generates an unbuildable plan
* Try to make CI happy
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>