* 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>
* HLint partial functions
* Delete commented out stuff
* Delete flag-based warnings, unclear they add much
* Delete DA-specific hints
* Delete extra cpp args
* Delete extension options relating to dead build system
* Don't bother trying to restrict CPP for now, it's everywhere
* Make the hlint job fail if there are any errors
* Fix for rebase, add unsafePerformIO and fold1 variants
* Add some more indexing functions
* Try turning off hlint on this test file
* Add .hlint.yaml file for hls-hlint-plugin
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 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>
* Add change-type-signature test suite and enable alternate-number-format for 9.2
* Revert 9.2.1 enable tests for alternate-number-format
* Clean up test file
* GHC 9.2.1 test fixes
* -Wall fixes
* Add to fix test failures
* Bump Version
* Fix codeAction on 9.2
* Enable test
* pointCommand: MIN_VERSION_ghc to 9.2
* Specify version
* Fix edit command
* Enable class plugin in cabal
* Comment addWhere
* Unify the method of obtaining identifiers
* Remove CPP
* Remove compile flag
* Rewrite filter with more restricts
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* nix: ghc92: ignore broken plugins
* nix: use current ghc for tools in the shell
Theses tools are pulled in the shell, but we don't need them to match
the GHC version used for development. Said otherwise, as long as we use
a working `cabal-install` to build with GHC 9.2, we don't care if that
cabal-install was built with GHC 8.10.
This gives more chance for theses tools to work and be in the binary
cache of nixpkgs.
* nix: disable shake-bench for ghc921
* nix: fix ghc 9.2 shell
* nix: explicit cabal project in devShell
Using alias, we get the "correct" behavior when typing `cabal build` in
the nix-shell, it points to the current cabal-project file.
* nix: remove special case for different ghc versions
* nix: move implicit-hie-cradle as a flake input
* nix: restore dev shell
This commit restores a working behavior for `nix-shell` or `nix
develop`, for all supported GHC versions.
When entering a `nix-shell`, or `nix develop
.#haskell-language-server-ghcXxX-dev` you will get an environment with
all the dependencies needed to run `cabal build`.
Haskell dependencies will be built by cabal instead of nix. This may be
more robust compared to a shell where dependencies are built by nix:
- It won't try to build any dependency with nix. This mean that it won't
benefit from nix caching, but on the other hand, it will perfectly
match the cabal plan.
- The nix shell may fail to start if an (possibly unneeded) dependency
was failing to build.
Entering nix-shell also generates an alias command `cabal_project` which
runs cabal with the correct project file if needed (e.g. for GHC 9.0 and
9.2). Users are notified with a message when entering the shell.
The old behavior (i.e. where dependencies are built with nix) is still
available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e.
suffix the name of the shell with `-nix`).
* nix: New entries which build all target at once
All HLS version can be built with `nix build
.#all-haskell-language-server`, and all development shells with `nix
build .#all-dev-shells`.
I had to workaround a limitation in `nix build` which is not able to
build multiples targets, instead I used linkFarmFromDrvs.
All packages and shells are now named with a unique package name
containing the GHC version.
* nix: Build all devShells and all binaries in CI
* nix: build HLS with dynamic linking
Related to #2668.
This fixs the build, however, because now HLS is dynamicly linked, it
pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`.
* nix; fix CI command
* nix: only build dev shell with nix packages for current GHC version
* Another tentative to fix the build
* fix: Eval and alternate number format works with ghc 9.2
* fix CI build
* ANother tentative fix
* Disable -dynamic for all workflows
* Remove quotes
* Bump version to 1.6.1.1
* Update changelog for 1.6.1.1
* Correct flag set
* add comment to ci step
* Restore header and link
* Reverse condition to upload candidates
As github.event.inputs.upload-candidates has no value when
the workflow is triggered via a -hackage branch
* Remove parenthesis
* Remove unused rerun by comment
* Remove install zip (again)
* Ignore gitlab ci in github
* Update release instructions
* Correct hls version
* Use name schema of github release
* Apply markdown-lint
* Complete th workarounds
* Bum up hls version
* Fix bug hls-wrapper non static
* Update dynamic build instructions
* Bump up wingman due to the last fix
* Correct grammar
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add list of merged prs
* Remove branch trigger
* Update release instructions
* Include 9.2.1 in the current release
* Bump up hls version
* remove duplicate mention
* Remove references to branch name
* Fix cabal.project gen
* Correct fail-fast condition
* Bump up minor version
* Bump up major version
* Bump up major version
* Allow brittany only for 9.0.1
* brittany not supported in hackage and 9.0.2
* Not short hls for hackage
* Bump up versions everywhere
* Update hackage index
* Add ghcide in rename plugin
* Apply linter and add selection demo
* Add header linkable
* Add first version of release description
* Add last prs
* Mention wingman
* Grammar corrections
Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
* Correct mention
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
* Warn about th in docs
* Remove reference to install doc
* Rephrasing
Co-authored-by: J. S. <document_done@hotmail.com>
* Better style
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
* Use could to stress it likely will not work
* REmove reliable from the warning
* Reorder comments
* Rephrasing
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update docs/supported-versions.md
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Use last version of internal deps
* Restore original wording
* One more pr
* One more pr
Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: J. S. <document_done@hotmail.com>
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* add selection range support
* add the whole import area as a selection step
* add selection range plugin to all project files
* merge type signature with value definition
* support ghc 9
* fix it for ghc-9.0
* remove unnecessary import
* reformat GhcIde.hs
* selection range: make it easier to understand
* selection range: improve error handling
* update lsp-types to 1.4.0.1
* add selection range to doc
* fix comment for findSelectionRangesByPositions
* remove a use of partial function
* update author & maintainer
* use foldlM1 instead of foldl1
* add testdata to cabal file
* update performace tips and log level
* update lsp-types in nix
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* add a failing test case for positionInRange
* fix positionInRange in PluginUtils
* add hls-plugin-api to CI
* fix ci
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* Remove integer-simple workaround
* Skip upload to the release
* Fix echo cabal.project
* Echo PATH
* Use specific cache for build
* runner not allowed out of steps
* Use common cache
* Use raw ubuntu for ghc-9.2.1
* Enable alpine for ghc-9.2.1
* Replace gitrev with githash
* Handle GitInfo exception
As it breaks `cabal install`
* Clean up build workflow
* Enable brittany for ghc-9.0.2
* Make works using cabal freeze
* Add stack 9.2.1 to ci
* Use new *molu versions
* Enable rename for stack 9.2.1
* Use last ghc-lib
* Use correct boot pkgs
* Use last ghc-exactprint
* Reorganize and use lens-5.1
* update retrie
* Comment class plugin package
* Handle Nothing case
* Restore ghc-typelits deps
* More non-exhaustive patterns
* More non-exhaustive patterns
* Set pedantic (-WError) true for cabal
* Remove pedantic as we set it out in cabal.project
* Not set pedantic for ghc-9.2.1
* Set pedantic in cabal.project's
* More non-exhaustive patterns
* Not set pedantic for ghc-9.0.1
* More incomplete patterns
* Fix WErrors
* Dodgy import
* Correct CPP conditions
* Not MonadFail in Prelude
* Fix more warnings
* Restore missing fun
* unused imports
* Enable refine imports
* more fixes
* Enable brittany in nix for 9.0.1
* Use newer prettyprinter
* Return to master
* Enable tactics in stack-9.2.1.yaml
* Enable pedantic in ci
* Avoid deprecation warning with CPP �
* Use default prettyprinter
* Update refinery for ghc-9.2.1
* Ignore deprecations
* Use dev version of ghc-source-gen
* disable wingman for 9.2.1
* Enable wingman for 9.0.2
* disable tactic with flag
* yaml grammar
* Use setup-build action
* Correct workflow
* Build flags for al major os's
* The integer twaek is needed for the solver
* Disable tests beforehand
* flags only affect local packages
* Exclude 8.6.5
* Exclude 8.8.4
* Initial partially broken ghc9 support for tactics
It compiles and most tests succeed, but some fail.
In particular, the ones where it should suggest `show` fails to find
that as a possible solution and fails to find evidence for `Show a`.
* Enable tactics plugin for nix as well
* Wingman does support ghc9 now
* Fix stack support for tactics ghc-9.0.1
* Enable tests for tactics on ghc-9 on ci
* Actually enable tactics for ghc-9 on nix
* Wingman: Improve test failure messages
Previously when wingman fails to find a solution, the test failure
would say "Timed out when waiting for a message".
Now it instead prints the error message from wingman.
* Get theta
* Make wrapper theta discovery more reliable
* Fix AutoThetaRankN
* Fix FmapJoin and FmapJoinInLet
* Fix MetaBegin
* Cleanup
* Fix merge
More fixing the merge
No, seriously fix the merge
Fix a broken merge
* Need a comma
* Try a better ConPatIn
* Oops
* its a nightmare
* i hate ci
* ok that fixes the conpat
* Maybe this is the end of it
* ci
* refinery
* undo some changes
* no more tctypes?
* maybe it builds now
* omg
* om F g
* expect fail on 9.2
* fix
* fix again
Co-authored-by: Andreas Källberg <anka.213@gmail.com>
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* Extract out ci build setup
* Add required shell property
* Add support for ghc-9.0.2
* Test ghc 9.0.2
* Add unix boot package
* Use primitive-unlifted < 1.0
* Use primitive-unlifted < 1.0 for stack
* Ude 9.0.1 for hackage
We cant use 9.0.2 until all deps do not need allow-newer
* Use a unified cabal-ghc90.project
And bump up index state to get lastest hie-bios
* Use last snapshot with ghc-9.0.2 support
* Use new cabal-ghc90.project in build
* Add stm-containers
* Add specific tweaks for ghc-9.0.2
* Use the las ghc-boot-9.0
* Fix test adding allow-newer
Co-Authored-By: @michaelpj
* Use unix-compat from hackage
* Use unix-compat from hackage
* Make consistent lastest stack.yamls
* Clean up cabal.project
* more cleanups
* Update tweaks in hackage ci
* Correct comment
* Correct fourmolu condition
* Correct fourmolu condition in tests
* Removing the all target from caching
It builds all project packages even if we they are not buildables
(and are not included in hls due to flags)
Its goal was build all tests and benchmarks but --enable-tests
ans --enable-benchmarks should work
Last one does not: https://github.com/haskell/cabal/issues/6259
* exclude Brittany 0.14.0.1
* Update snapshot to get new lsp
* document flag
* Document and build ghcide benchmark
* Doc and use ghc-9.0.2 in hackage
* Add ghc-9.2.1 to tested-with
* Use 9.0.2 in gitlab
* Use last *molus
* Use same versions as cabal build
* Use cabal freeze versions
* Add dep for ghcide tests
* one by one
* Unnecessary change
* Remove unnecessary flag
* Corrections
* Move blocks
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Introduce a Compat layer for retrie Annotated type
* Use GetAnnotatedParsedSource in rename plugin
We already have a cached delta AST at hand
* fix build issues
* remove debugging traces
* Fix hlint
* Enable class-hierarchy for 9.2.1
* Add module-name plugin to tests
* Update docs status
* Include module plugin via flags
* Module name does not compile for ghc-9.2.1
* Bump Ormolu and Fourmolu to latest versions (resp. 0.4 and 0.5)
* Enable Ormolu and Fourmolu on GHC 9.2
* Bump index-state
* enable tests for ghc-9.2.1
* enable fourmolu and ormolu
* Allow newer ghc-lib-parser for *molu
* Fix ormolu
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
* WIP
* progress
* enable 9.2 in CI
* Sort out some compatibility issues (#2511)
* fix mkPrintUnqualifiedDefault
* fix qualified idents
* Fix a few more ghc compats
* Add new orphans
* Fix runtime APIs
* HsParsedModule
* export GHC.Hs.Utils
* 9.2 compat for unloading and hie file generation
* hlint fix
* Remove 'setupFinderCache' as its never actually used
* 9.2 compat for Development.IDE.Core.Compile
* Stub out 'getDocumentation' on GHC 9.2 (Requires a reimplementation in terms of in-tree annotations)
* Expose binds
* Remove a bit of CPP by refactoring it into Compat layer
* Progress on ghc-exactprint stuff
The Exactprint module compiles, but code actions are the next focus.
* Fix compile on 8.10
* 9.2 compat for CodeAction Exactprint
* 9.2 compat for Outline
* 9.2 compat for Pragmas plugin
* Get the rest compiling with 9.2
* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE
This hook starts caching pipeline inside of the PR.
If this got merged - all PRs would start to run caching workflow (which is
undesirable, because of platform limitations)
* disabling {test,bench} to properly heat-up the cache
`index-state` change means nothing, but allow to run increment action on
dependency cache pile (as otherwise cache stays idempotent to its key id).
* CI: index-state: +1s refresh
Somehow previous run got early termination. Seems like some GitHub bug, since
cache-hit promises to True only on direct key hit (& we had indirect).
Maybe second time the charm.
* CI: fix early termination
GitHub accepted previous code, & did passed the steps, but somehow ... long
story short, it was pretending to have early termination working, while it just
was always skipping those steps silently.
So, `index-state` needs another +1s.
* WIP: PLEASE, DROP BEFORE MERGE
* WIP: PLEASE, DROP BEFORE MERGE
This reverts commit 064a9b7995.
* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE
This reverts commit 208f4844f4.
* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE
This reverts commit ba4d618ba5.
* CI: index-state advance to save cache anew
* CI: apparently GitHub uses alias cp='cp -i'
Another day, another bug.
* WIP: PLESE, REVERT TO TEST ALL GHCs
* CI: index-state +1s
* WIP: PLESE, REVERT TO TEST ALL GHCs
* CI: index-state +1s
* WIP: PLESE, REVERT TO PASS HLINT CI REQUIREMENTS
* Enable tests for ghc-9.2.1
* Use cabal-ghc921.project
* Enable tests for all ghcs
To check changes for ghc-9.2.1 do not break other ghcs
* Address or skip hlint
* Last hlint fixes
* Fix loop when setting DynFlags
* Filter out evidence variables in documentHighlight
* Fix getFlds
* fix GRE
* fix formatting
* fix Compat build in 9.0
* fix collectHsBindsBinders
* remove redundant WarnMsg local typedef
* showSDocForUser
* redundant import
* HsLet
* LetStmt
* fix Completions build
* bump cabal index state
* Literals: replace argument patterns by field patterns
Sadly this is not enough to fix the build
* QualifyImportedNames: fix build with ghc <9.2
* fix <9.2 build Splice plugin
* fix <9.2 build QualifyImportedNames plugin
* Fix <9.2 build Wingman
* fix build example
* Disable a whole bunch of plugins
* Move windows test into the matrix
* Make consistent plugin handling
package commented out <-> flags <-> test suite
* Add a not working stack.yaml for ghc-9.2.1
It starts to build though
* Remove wrong comma
* Restore primitive allow-*
* Use correct UnitId when constructing InstalledModules
* Fix 8.8 build
* Fix hls-test-utils
* Build explicit imports plugin
* Drop Windows build blocked on unix-compat
* bump Cabal index and simplify constraints
* Add comment
* Use GhcSessionDeps in getHieAst
* Use hsConDeclsBinders in Outline generation
* Use the right session in typecheckModule
* Restore some cases in Outline
* Fix Outline build with GHC <9.2
* Remove noisy logMessage notifications in tests
I have never found these useful and they make it much harder to read logs. If there is a test that needs them, please use a custom logger instead of forcing this madness on everyone.
* Build ghcide test and bench suites with 9.2
* Revert "Merge branch 'master' into ghc-9.2"
This reverts commit daf43c86e8, reversing
changes made to f951004021.
* The redundant constraints warning has changed in 9.2
* Fix code action regression
* fix 9.2 ghcide build
* Fix completion snippets
* Fix mismerge
* Bifunctor instance for GenLocated
* Build rename plugin with GHC 9.2
* Helpers for tracing ExactPrint ASTs
* Fix exactprint code actions
* Enable import lens plugin
* WIP test run changes
* Fix GHC 9 build
* Undo WIP test changes
* Fix GHC 8.8 build
* Fix 8.6 build
* Fix another exactprint regression
* Add source repository with ghc-exactprint fixes
* Add source repository for retrie (needed for fixed ghc-exactprint)
* fix ghc <9.2 build
* Another exactprint fix
* Fix benchmarks
* Another exactprint fix
* Disable a plugin test (plugin not compatible anymore)
* Enable windows build
* Fix multiple components by using consistent UnitIds
There are multiple sources of truth for the home unit id now, in the DynFlags and in the hsc_units
* Improve error handling for initPlugins
* Fix two hover tests
* Remove retrie and ghc-exactprint source repos
* Fix version of direct-sqlite
Not sure why this is needed, but without it Cabal is selecting an older version
which fails to build with 9.2
* Fix ci update hackage index
* This test is broken because GHC 9.2 built-in libraries lack docs
The interface files have no docs, checked via:
ghc --show-iface ~/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/x86_64-osx-ghc-9.2.1/base-4.16.0.0/Data/Functor.hi
* Sanitize hiding tests
These tests are reimplementing runWithExtraFiles - let's just use it
* Disable another test
* Fix outline
* Revert "Sanitize hiding tests"
This reverts commit 4f016ddca2.
* Extract out ci build setup
* Correct action path
* Add required shell property
* Remove unused cabal version
* Update .github/actions/setup-build/action.yml
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update .github/actions/setup-build/action.yml
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update .github/actions/setup-build/action.yml
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Fix remaining tests and some warnings
* Update .github/actions/setup-build/action.yml
Co-Authored-By: @michaelpj
* Copy alt project file unconditionally
* Make freeze strict
* Actually fix tests
* remove unnecessary? allow-newer
* Drop no longer needed source repo for th-extras
* Add module header comments
* Fix or remove commented out code
* more commented out code
* Disable a couple of func-test tests
* All func-test tests passing now
* fix test matrix
* Update cabal-ghc921.project
* do not test class plugin
* Mark hover test broken in Windows and Mac
* Fix hls-pragmas-plugin test suite
* disable testing of refine imports plugin
* disable rename plugin
* Do not test qualify imported names plugin
* addressing hlint suggestions
* Revert hlint change that breaks due to CPP
Co-authored-by: Alan Zimmerman <alan.zimm@gmail.com>
Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: jneira <atreyu.bbb@gmail.com>
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Enable tests for brittany and 9.0.2
* Enable tests for floskell plugin
* cabal-ghc901.project: naively enable brittany
* haskell-language-server.cabal: bump brittany flag <(9.0.1->9.2.1)
* Trying to add support for brittany
* Use last hackage floskell version
* Activate floskell in func-test suite
* Restrict brittany in hackage for ghc<9.0.1
* Adapt to Aeson.Key
* Update lsp source repo package
* Refer pr for butcher
* Add missing prefix
* Adapt to aeson-2 (incomplete)
* Use compat module
* Support for aeson-2 and extra-1.7.10
* Remove lsp
* Allow newer aeson for stylish-haskell
* Add needed import for non windows
* Remove insertJson and toJsonKey
* Update cabal-ghc901.project
* Missing import
* Avoid CPP by using lens-aeson
* Update hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs
* Use ghcide compat module
* Use type alias in cpp
* Fix stack build for ghc-8.6.5
* Use lens-aeson key
* Use lens-aeson in func-test
* Fixup shake-bench
* Update docs
* Switch to lens ix
* Try this
Co-authored-by: Anton-Latukha <anton.latukha@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Extract out ci build setup
* Correct action path
* Add required shell property
* Remove unused cabal version
* Update .github/actions/setup-build/action.yml
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update .github/actions/setup-build/action.yml
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update .github/actions/setup-build/action.yml
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update .github/actions/setup-build/action.yml
Co-Authored-By: @michaelpj
* Copy alt project file unconditionally
* Make freeze strict
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Update to latest version of lsp libraries
* Compute completions on kick
This is not only for faster completions.
It's also needed to have semi-fresh completions after editing.
This is specially important for the first completion request of a file - without this change there are no completions available at all
* Emit LSP custom messages on kick start/finish
useful to synchonize on these events in tests
* Fix completions tests after https://github.com/haskell/lsp/pull/376
* Restore cabal update with comments
* Use new lsp in stack 9.0.1
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: jneira <atreyu.bbb@gmail.com>
* CI: caching: do `bench` & `test` separately
`cabal v2-build all --enable-tests --enable-benchmarks` inferres 1 version per dep
keeping all targets.
People (frequently) & CI do `test` & `bench` separately.
So `all tests` & `all bench` deps may not end up.
Even current code does not match the CI guarantees, as all plugins get `test`
separately, so their deps can not match-up.
`caching` should not assume guarantees bigger then provided.
* CI: caching: rm workaround
This workaround was not addressing the CI behaviour.
* CI: {caching, test, bench}: output `freeze` or warning
* CI: {caching, test, bench}: m v2-update unification
* CI: caching: do bench caching only for what gets used
Efficient use of available space.
* CI: caching: fx benchmark caching step
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* CI: {caching, test, bench}: `haskell/actions/setup` does the update
* CI: caching: m fx
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* CI: add hlint workflow
* CI: hlint: update to action
This is what `fmt.sh` runs.
* CI: hlint: use version 3.3.1
* CI: hlint: fix args
* CI: hlint: use 3.3.4
* CI: {caching,test,bench}: mk cache aware of package dep versions
1. CI caches 3rd patry dependency binaries.
2. That is why we do not want to trigger on all `.cabal` changes. We want to
cache only when changes in `.cabal` descriptions lead to changes in versions of
deps used, or in their compilation flags. `freeze` files:
For example the bits of the resulting `.freeze` file:
active-repositories: hackage.haskell.org:merge
constraints: any.Boolean ==0.2.4,
...
any.HsYAML ==0.2.1.0,
HsYAML -exe,
any.HsYAML-aeson ==0.2.0.1,
HsYAML-aeson -exe,
any.JuicyPixels ==3.3.6,
JuicyPixels -mmap,
any.MemoTrie ==0.6.10,
MemoTrie -examples,
...
any.QuickCheck ==2.14.2,
QuickCheck -old-random +templatehaskell,
aeson -bytestring-builder -cffi -developer -fast,
...
any.aeson-pretty ==0.8.9,
aeson-pretty -lib-only,
bifunctors +semigroups +tagged,
any.blaze-textual ==0.2.2.1,
blaze-textual -developer -integer-simple +native,
...
any.brittany ==0.13.1.2,
brittany -brittany-dev-lib -brittany-test-perf,
...
any.clock ==0.8.2,
clock -llvm,
any.cmdargs ==0.10.21,
cmdargs +quotation -testprog,
...
any.comonad ==5.0.8,
comonad +containers +distributive +indexed-traversable,
...
any.hashtables ==1.2.4.2,
hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks,
haskell-language-server -alternatenumberformat +brittany +callhierarchy +class +eval +floskell +fourmolu +haddockcomments +hlint -ignore-plugins-ghc-bounds +importlens +modulename +ormolu -pedantic +pragmas +qualifyimportednames +refineimports -rename +retrie +splice +stylishhaskell +tactic,
...
any.hlint ==3.2.7,
hlint -ghc-lib +gpl -hsyaml +threaded,
hls-eval-plugin -pedantic,
hls-graph -embed-files -pedantic -stm-stats,
hls-hlint-plugin -ghc-lib -hlint33 -pedantic,
...
any.integer-logarithms ==1.0.3.1,
integer-logarithms -check-bounds +integer-gmp,
...
any.lens ==5.0.1,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
...
any.scientific ==0.3.7.0,
scientific -bytestring-builder -integer-simple,
any.semigroupoids ==5.3.6,
semigroupoids +comonad +containers +contravariant +distributive +tagged +unordered-containers,
any.semigroups ==0.19.2,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
...
any.transformers-compat ==0.6.6,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
...
any.vector ==0.12.3.1,
vector +boundschecks -internalchecks -unsafechecks -wall,
any.vector-algorithms ==0.8.0.4,
vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
...
index-state: hackage.haskell.org 2021-11-29T12:28:17Z
```
You got the idea. `freeze` collects stuff for dependencies.
I also checked - it solves & collects all package configuration across all
subprojects in one file.
* CI: {caching,test,bench}: freeze: allow to fail
Before we not had this at all.
Now - most cases would use it.
But for example, all HLS subprojects can not solve single version of deps for
GHC 9.0 at once.
And depending on `.cabal` is not the right way, as it means to account of only 1
configuration of many in the project.
* CI: {caching,test,bench}: fx cache keys
* CI: {caching,test,bench}: freeze: output result into log
* CI: caching: add workaround to allow last step to fail
* CI: {caching,test,bench}: use only freeze file hash
This solves the `build all` problem when all projects can't infer the consitent
package version.
Also would allow caching workflow on manual start - to work & cache in a broken
or complex PRs.
* Enable manual run
* Remove skip ghcide
We want to build all deps
* Enable manual run of hackage
* allow only check packages
* Enable manual run of build
* CI: caching: fix early termination expression check
It is obscure bug.
Details are in
https://matrix.to/#/!oOjZFsoNYPAbTEgSOA:libera.chat/$tB_L6wbaxe1ElQtYzMI9woID4hZyscS6Rhpn-nsCc6Y?via=libera.chat&via=matrix.org&via=monoid.al
Because after the second path somehow it always returned `False` - the caching
runs always resulted in early termination.
* CI: caching: fx `cabal.project` copying
In the
https://github.com/haskell/haskell-language-server/runs/4596861600?check_suite_focus=true
of
https://github.com/haskell/haskell-language-server/pull/2503
Noted that:
I rm cabal.project. The sources of cabal-ghc921.project contain:
index-state: 2021-12-18T00:00:07Z
cp cabal-ghc921.project cabal.project
Then from cabal.project CI retrieves finderprint 2021-11-29T08:11:08Z.
Seems like GitHub uses alias cp=cp -i - preventing UNIX-like default copying over behaviour.
& rm cabal.project does not remove the file.
cabal.project seems to be protected from deletion.
* cabal*.project: index-state +1s
Renewing cache.
* CI: {caching,test}: make rm/cp comment more informative
* CI: {caching,test}: upd commets
This should short-cirquit.
* cabal*.project: index-state +1s
* Correct small typo
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Use `extQ` to choose parser.
- In the process of development, it was forgotten that the "parent" type
of patterns and exprs is different. When traversal occurs, SYB would
throw out `Pat` types as it was only expecting `HsExpr` types.
- Using `extQ` allows us to chain the expected types and we can then
destructure patterns appropriately.
* Revert "Disable alternate numbers format plugin temporary (#2498)"
This reverts commit 15d7402696.
* Rework troubleshooting section, add basic explainer
This is an attempt to make the troubleshooting doc a bit better
structured. It's a bit lacking in concrete details for some of the
common problems (because I forget exactly how they mainfest), but I hope
that we can beef this up as things come up.
I also added a short explainer doc which explains some of the key
concepts.
* Update docs/troubleshooting.md
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
* Reorganize a bit
Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* CI: caching: add early termination
* CI: caching: run cache check 3 times a day
Recently there is a lot of PRs/builds from internal repo branches. Repo cache
has 10G pool limit & PR caches are not shared between PRs, but main branch cache
is.
Checking & when missing rebuilding it ensures that if internal branch PRs pushed main state
out of the pool - it gets reinstituted.
*afaik* there is no way to prioritize main branch cache better, since GitHub CI
FIFO caches out of the pool by build time.
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Disable alternateNumberFormat temporary
* Disable alternateNumberFormat tests
* Add a warn in docs
* Add link to issue in docs
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Bump class plugin to work with GHC 9.0.1
* Update class flag in hls cabal file
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* CI: workflows: disable stack where it is not used
Hopefully it would remove it & its files from being cached in the action. & also
not includde into environment.
* CI: {bench,hackage} add Linux platform config
For future caching configuraiton.
* CI: {caching,test,bench,hackage}: retrieving index timestamp
For 1:1 according cache to it.
* CI: {caching,test,bench,hackage}: new caching process
Sources are stored separately.
Before this cache was storing per Platform/GHC sources & compiled results
together. While deps sources does not depend on platform or GHC, they are
platform & GHC agnostic. Because sources & compiled results were stored togather
& sources took ~1/2-2/3 of that - cache stored multiple duplicates of the same
source code.
This config stores the source code separately.
And at the same time tries to store & share all source code which may be needed.
& all compiled deps that would be used in different workflows.
* CI: caching: separate source retrieval step & separate build step
* CI: {caching,bench}: add executable patching for cache
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* CI: caching: upd doc
* CI: caching: rm schedule
It seems would not be needed.
`cabal.project` has pinned Hackage revision & when HLS code updates in `master`
is during merges.
* CI: caching: build & save cache
* CI: (caching,test,bench): org bootstrap
This were organized but others were ommited, because `build` & `hackage` have a
different purpose I postphoned addind bootstrap to them.
* CI: rm submodule checkouts
Seems like HLS does not plan to use submodules.
* CI: bench: fitting the workflow to strategy chosen
Still kept the 9.0.1 bootstrap, because the very next workflow standard GHC
update would hit the need of that code.
* CI: bench: default to bash
* CI: bench: rm env step
* CI: Circle-CI: m fx
Merely to refresh the Circle-CI report status in the PR
* CI: caching: fx: rm executable name patching
* Remove support for ghc 8.8.3/8.10.5
* Remove ghc-8.10.5 from circleci
* Correct releases links
* Rename stack test dir
* Parametrize stack wrapper test
* CI: (cache-deps->caching)
* CI: caching: add doc
* CI: rm 8.10.5
Since next HLS release is no longer supports this version.
* CI: update to currently recommended Cabal version
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* CI: cache-deps: rm pull request hook
I needed to remove
b0621d7490
before merge.
That is my fault, I should be more conservative between draft<->mergable PR.
* CI: cache-deps: shift cache regeneration time
Since most contributors are in the US & EU, & lets pretend they contribute
between 17:00 - 00:30 - this cache time seems better.
* Initialize and Setup Plugin Source.
* Provide Traversal Module to Haskell AST that collects Literals.
* Change Literals module to return type.
Update our parsing module to return the data type we will use in our
plugin.
The datatype: Literal
Constructors:
Overloaded - Contains an overloaded literal with a SrcSpan
NonOverloaded - Contains non-overloaded literals with a SrcSpan
NoLocation - currently unused.
This data type is bound to change. This module is designed to capture
ALL numeric literals for use in the plugin. When parsing Haskell source
tree, certain cases result in getting a plain `Expr`. This means it is
not annotated with a SrcSpan. As a result, we pass along a SrcSpan
through most functions to keep track of the most recent SrcSpan
encountered. This isn't a fool proof plan and may be removed in the
future.
* Implement Logic for actual CodeActions.
The traversal of Haskell source has been turned into a rule. This rule
generates hidden diagnostics which allow a user to run a code action
over (most) literals.
There is some "dead code" in the sense that some literals (prims to be
exact) are not allowed to be changed, despite existing in code. The
other "dead code" exists in the FormatType type. Certain extensions
exist that alter how numbers are shown or act, we make note of those
extensions but call them "NoFormat", which essentially means it's a
NOOP.
Most of the conversion is done via the Numeric module. There are plenty
of "show" functions that provide the translation of numbers into the
various formats. The only custom format is a slightly "dumb"
NumDecimal-extension-function that generates three separate options,
instead of using a numeric defined function.
* Clarify source code comments. Reformat file structure.
* Set up Test Scaffolding.
* Miscellaneous clean-up.
* Use Regex to Match Source Text.
* Remove unneccessary diagnostics from Rule.
* Update all stack versions to include new Plugin.
* Clean up Conversion.hs and AlternateNumberFormat.
Clean up function names and add supporting haddock documentation for
exported functions.
* Update cabal file bounds and add Github workflow test
* Add plugin package to all cabal.project
* Add plugin to test suite
* Push SYB changes. Test.hs is merely for testing and will be removed prior to Merge.
* Use Generics.SYB for parsing Literals from GHC Source.
Updated Literals.hs to use custom SYB traversal of the AST.
* Update hls-alternate-number-format-plugin.cabal
* WIP: run tests
* Test additions and GHC compatability changes.
* Removed dead code.
PrimLiterals were defined originally, however GHC source doesn't provide
the source text. This is one of the needs of the plugin so we don't
provide duplicate suggestions.
Swapped `Maybe Text` to `Text`. Similar to above we now ignore all
literals that have no source text attached.
Swapped `Maybe SrcSpan` to `RealSrcSpan`. Again, similar to the previous
points we now ignore literals that don't get a sourceSpan attached.
Similarly, we drop any `UselessSpan`'s as those are also not very
helpful.
* Use Set to remove duplicates from CollectLiterals Result.
Certain AST representations are traversed multiple times with the switch
to SYB. Using Set allows to easily remove duplicate Literals from our
result.
Added a test suite to monitor for regressions.
* Delete Test.hs
Inadvertently commit this file.
* Add README and bump version to 1.0.0.0.
* Update HLS cabal file for version change.
* Additional Tests.
* Update Test file to use Path library function.
* Miscellaneous Code Fixes.
- Remove unneeded imports/functions.
- Export only specified functions from each module (and add Haddock
Comment if necessary)
- Minor text changes for accuracy
* Add README to Extra Source Files.
* Update Extra Source Files to include Test Haskell Source files.
* Update Features.md and Minor Bug Fix :)
* Add new plugins to hackage workflow
* Fix Bug caused by Minor Bug Fix.
Co-authored-by: jneira <atreyu.bbb@gmail.com>
Co-authored-by: Fendor <power.walross@gmail.com>
* Add test-case for projects that use symbolic links
In particular, this test checks whether modules that are actually
symbolic lins can be found by ghcide.
This is known to be broken, as Session.hs canonicalises Targets, e.g.
saves the location of the symbolic link. When we later try to load that
module, we can't find it, as it won't be part of the known targets since
it is not canonicalized.
* Dont canonicalise Targets during session setup
Canonicalising Targets makes it harder later to actually find the
targets during import analysis, as ghcide only looks for modules in the
import paths and checks for existence in the known target Map.
However, import analysis doesn't canonicalise target candidates, thus
the lookup in the known target Map will always fail.
We no longer canonicalise Targets, so import analysis will succeed
loading modules that are actually symbolic links.
* Prefer makeAbsolute over canonicalizePath
* Use makeAbsolute to read HIE files from disk
* Restore repeated builds
the ghcide build fails for win and ghc-8.8 with segfaults
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* actual initial qualify imported names implementation
* renamed and added tests for QualifyImportedNames plugin
* fix backtick and parenthesized operators not being qualified correctly
* add tests, and remove logging
* add license, readme, and demo
* remove old demo, add slightly better demo
* remove old mp4 demo, add slightly gif demo
* update readme to use demo
* readme typo
* slight rewording of readme
* slight rewording of readme 2
* remove Demo header from readme
* don't need ShakeExtras and remove some more logging stuff
* hopefully fix ghc 9 differences, rename plugin cabal file
* forgot comma on module re-export
* minimize imports
* fix Hashmap import for ghc <= 8.8, remove unused extension pragmas
* fix hls-qualify-imported-names ghcide bound
* add test suite to CI
* add more tests for qualify imported names plugin
* change ghcide bound to match what @hololeap is doing
* add qualify imported names to feature list
* add demo, readme, test files, test hie.yaml to extra source files
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* Add modern issue templates
* Replace with modern issues templates
* Mention discussions in the blank issue
* Mention explicitly vscode binaries location
* Correct grammar
Co-authored-by: fendor <fendor@users.noreply.github.com>
* Correct grammar
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Rephrase into
Co-Authored-by @michaelpj
* they already let you open a blank one
* Comment out suggestions
Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Rerun tests between run attempts
* without quotes
* Bump up versions for hackage
* Add support for auth github requests
As anonymous ones reach the api limit quickly
Via a unique argument with a github oauth token
* Add changelog for 1.5.1
* Fix makrdownlint warnings
* Bump up index state
* Bump up plugin version
* build with -v3 on error
* More backjumps for tests and benchs
* Add last prs
* eval plugin needs ghcide>=1.5.0.1
* Include #2395 in the changelog
* Ignore deferred tests for win and 9.0.1
* Ignore tactics tests for ubuntu+8.6.5
* Check the build workflow
* Add gitlab/ghcup specific intructions
* Apply suggestions from @michaelpj
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Note where are release artifacts
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Use hackage version of czipwith
* Update stack.yaml's
* Remove source czipwith
* Update index and clean cabal-ghc921.project
* extra-1.7.9 has a breaking change so no way
* Increase resources for circleci
As for November 16, circleci has set a timeout of 1 hour for jobs in free plans
Trying to increase resources to make the build faster as suggested by its support center
* Use more threads reduce build times
* Correct runs-on field
* Update stack.yaml's
* Dont fail fast if we are checking
* Use ref_name to check it is a check
* Bump patch version of brittany plugin
* Allow newer base/th for czipwith
* Add enough allow-newers to allow build the project
Having all subpackages included in the `packages` field
* Correct allow-newer's
* Add missing cd's
* Bump up ghcide to 1.5.0
* Exclude pkgs not buildable with 9.0.1
* Bum up plugins with changes versions
* Bum up subpackages with changes versions
* Bum up hls version to 1.5.0
* Bump up haddock plugin version
* Allow ghcide 1.5
* Use ghcide 1.5.0 in the rest of plugins
* Use ghcide 1.5.0 for pragmas
* Allow tactics 1.5.0 for hls
* Remove czipwith in hackage ci script
* Disable 9.0.1 for hackage ci
* Use bounds operator consistently
* Build formatters with newer ghc-lib-parser
* Only stylish-haskell needs newer ghc-lib
* Avoid ghc-9.0.1 in other way
* Script needs a min time version
* First draft of 1.5.0 changelog
* Comment out hackage for 9.0.1
* allow newer ghc-lib-parser
* Remove redundant entry
* Correct condition
* Cancel previous hackage jobs
* Add link to pepe's talk slides
* Use th-extras master
* Use th-extras master and uncomment packages
* add extra-1.7.9
* Add required extra-deps
* Comment unbuildable packages again
* Add ignore-plugins-ghc-bounds
* Add #2354
* Complete ghc deprecation notice
* Add extra-1.7.9
* Add #2346 to Changelog
* Use hackage version of czipwith
* Update stack.yaml's
* Remove source czipwith
* Update index and clean cabal-ghc921.project
* extra-1.7.9 has a breaking change so no way
* Increase resources for circleci
As for November 16, circleci has set a timeout of 1 hour for jobs in free plans
Trying to increase resources to make the build faster as suggested by its support center
* Use more threads reduce build times
* Correct runs-on field
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* Not suggest exported imports
* Add testing explicit-imports-plugin to github workflow
* Add comment
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* First temporal changes
* Clean up tests plugin inclusion
Deprecate them as they will be removed when all tests are
moved to their own plugin packages
* Use force-plugins in project files
* Add ghc-9.0.1 to hackage release workflow
Diabling actual upload if the branch contains 'check'
* Improve force-plugins explanation
* Correct deprecated pragma location
* Dont use deprecated pragma
* Correct yaml config error
* Change flag name
* Use new flag name in project files
* Add option to cancel prev runs
Without using skip-duplicate-actions which is failing due to github access permission.
See https://github.com/fkirc/skip-duplicate-actions/issues/103
* Cancel by branch *and* workflow
Without it will cancel other workflows for the same branch
Credits: 7b371e8b
* Disable cancelling other runs
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Use post job to set workflow status
* Apply post_job trick to bench and nix
* Change label to skip circleci
* Delete setup cache ide step
* Skip circle ci when skipping gh
* No skip circleci if its config change
* Look for skip label in comments as well
* Add missing condition
* Use a explicit github token
* attempt to fix hiedb lock errors
it looks like the test runner has a preexisting process locking the hiedb
* Move ghcide cache to the tmp folder
* Use ${{ runner.temp }}
* clean up the hie-bios cache too
* The runner context doesn't exist outside the steps section
* Move hlint tests to its package
* Move hlint config tests to its package
* Update extra-source-files
* Remove unused cabal-helper test data
* Add hlint test suite
* Make diganostic tests work without hlint
* Make progressCap test work without hlint files
* No cabal files in hlint test data
* Fix progress test
* Fix parent folder name
* Correct test data dir
* Correct extra-source dir and update maintainer
* Use sendConfigurationChanged everywhere
* Allow Fourmolu 0.4
* Reformat record construction to Fourmolu style
* Run stylish-haskell on imports
* Enable fourmolu for ghc-9
* Enable fourmolu tests for ghc-9
* Enable fourmolu for ghc-9 and stack
* Correct stack-9.0.1.yaml changes
* Use explicit import to avoid shadowing
* Remove unused import
* Bump plugin version
* Enable -Wall
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* Generate source tarball
* Update release doc
* Checkout code and create subdir
* Separate src-tar in a new job
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Remove outdated setup troubleshooting
* Remove ghc-8.6.4 support
* Remove ghc-8.10.2 support
* Remove ghc-8.10.3 support
* Remove ghc-8.10.4 support
* Complete list of tested ghcs
* Update stack resolvers
* Update hackage index
* Set 8.10.7 as default stack.yaml
* Use extra 1.7.9
* Update nix flake
Doing a nixpkgs update gains ghc 8.10.6 support.
lsp-types needed updating to satisfy bounds so I did that.
* Add ghc-lib-parser override required for ormolu
* Put the override in the right spot, oopsie
* Pass --print-build-logs to nix commands
* Fix tracy on darwin
* Remove the macOS hack since it got merged
* It appears this is actually ghc8107 by now
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Potato Hatsue <1793913507@qq.com>
* Add stack yaml for ghc-8.10.7
* support for ghc-8.10.7
* Use void as suggested by hlint
* Remove duplicate build
* Update extra-deps for ghc-8.10.7
Copied from #2138 stack-8.10.6.yaml
Co-authored-by: peterbecich <peterbecich@gmail.com>
* allow newer ghc for ghc-api-compat-8.10.6
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
Co-authored-by: peterbecich <peterbecich@gmail.com>
* Support for ghc-8.10.6
* Always miss this one
* Update tested-with .cabal field
* Pin optparse-applicative for stylish-haskell
* Add needed extra-deps
* initial commit
project structure
initial test cases
directly modify source to rename references
* code style
* enable for ghc < 8.8.0
* remove aeson from build-depends
* update support
support ghc9
revert retrie version bump
disable feature by default
* enable plugin for testing
* fix test.yml
* code style, ghc9 retrie bump
remove unnecessary flag in test.yml
consistent indentation
increase retrie version for ghc 9.0.1 (decreased by mistake)
* avoid using Data.List.nub
* code style
fix typo in indentation test
break lines at 100 chars
rename some vars
* code style / performance
remove Retire dependency by using exactprint directly
group references by file to increase speed of checking `elem` per file
add test cases (typeclass, let expression)
add some documentation
fix bug when looking up reference in HieDb
improve error messages
rename some function / vars
* replace GhcPlugins import with Name import
* use GHC.Types.Name for ghc >= 9.0.1
* [ghcide-bench] Support extra args in examples
This is useful in the context of #2060 to compare performance with and
without reactive change tracking
* Fix bench.yml CI script
* Test 9.0.1 for windows and macOS
* Refactorize ghc checking in tests
* Replace CPP checks with ghcVersion
* Use GHC cpp and remove 8.4
* Use the ghc version runtime checker
* HLINT ann ignored for ghc-9 too
* Mark test as broken for win and ghc-9
* Use GHC90 in eval tests
* Disable tests for macos and ghc-9.0.1
* Test 9.0.1 for windows and macOS
* Refactorize ghc checking in tests
* Correct imports/exports
* Replace CPP checks with ghcVersion
* Use GHC cpp and remove 8.4
* Use the ghc version runtime checker
* HLINT ann ignored for ghc-9 too
* Mark test as broken for win and ghc-9
* Use GHC90 in eval tests
* Avoid reformatting code
* Remove not supported ghc-8.4
* Disable tests for macos and ghc-9.0.1
* Ignore hlint+cpp tests for win and ghc-9.0.
* Eval plugin: support ghc 9.0.1
* Update CI and stack
* Use pprTypeForUser for printing kinds
* test: remove forall
* test: [Char] -> String
* test: update forall
* Keep tests only for GHC 9
* Update nix and CI
* Mark one hlint test as known broken
* Re-enable tests for other ghc versions
* Update test
* nix: add support for ghc 9.0.1
* Add CI
* Don't use overrideScope
* Try to disable plugins properly
* Avoid removing attrs of hpkgs
* Split CI steps
* Jailbreak all ghc901 packages
* Override `operational`
* Disable the test of `dual-tree`
* Override `dependent-sum-template`
* Disable tests for every ghc901 package
* Remove formatters executables from dev shell
* Disable pre-commit check for ghc901
* Override `diagrams` packages
* Override `monoid-extras`
* Disable class plugin and refineImports plugin (consistent with cabal-ghc901.project)
* Add windows to ghcup artifacts
* Add 7z compress
* Make move generic per os
* Generate sha256 sums
* Include .tar.gz and sums in artefacts
* Clean up sha256sums tags
* Add GHC 8.10.5
* Remove GHC 8.10.2
* Fix cabal build
* Downgrade bench to 8.10.4 as master do not have 8.10.5
* Add missing window builds
* Update ghc-api-compat location
* Mark a test as broken in GHC 8.10.5
* Exclude ghc 8.10.5 for MacOS CI
* Update build.yml
* Revert "Remove GHC 8.10.2"
This reverts commit b85b02903b797e63a57179ba49c02fe204e2aab6.
* hie-compat: Add basic support for ghc-9.0.1
A tiny step towards #297
* hie-compat: Remove dependency on ghc-api-compat
* hie-compat: Add more backwards compatability
* Import a bunch of upstream ghc9 fixes
* cabal.project: allow-newer: *:*
The lazy solution to making things compile
* Add more upstream fixes
* Bump patch of ghc-check
* ghcide: Add basic support for GHC-9.0.1
I tried to limit the use of CPP to the Compat module as much as possible
by re-exporting the new functions under the old names,
but there is still plenty of pragmas all over the code.
I'm using ghc-api-compat so the imports doesn't need to be changed as much.
* ghcide: Fix backwards compatability with ghc-8.8.4
* ghc9-ghcide: Fix some more issues that caused runtime errors
* Restore initDynLinker for older versions of ghc
It was probably important for something
* Fix ghc-8.6.5 compatability
* Fix completion test failures for ghc9
With this example:
f asdfgh = asd
it would suggest to complete `asd` into `asd_arNC`,
which seems to be a name it generated because of
deferred-out-of-scope-variables
* Ghc-check now supports ghc-9.0.1
* Retrie now supports ghc-9.0.1
But it's not on hackage yet.
* Restore retrie orphans
* tests: Ghc9 shows [Char] as String by default
This seems like an improvement, so just update the test-suite
* tests: Ghc9 shows TH-errors after the dollar sign
Instead of including it like older versions did
$(foo)
~~~~
some TH error/warning
* Fix two more test failures
- GHC9 uses a more lenient haddock parser
- TH2.17 has polymorphic Q monad with a type class
* ghc9: Fix "Remove redundant imports" code action
In ghc9, only the specific unused function is highlighted,
instead of the whole line.
* ghcide-tests: Show errors where they are caused
instead of deep inside some generic helper function
* Only use nub on SrcSpan for ghc>=9
* Remove more CPP pragmas
* Remove a bit more CPP
This could almost be handled by ghc-api-compat,
but if it was imported from TyCoPpr, it doesn't work with
ghc < 8.10
* Update stack files to support new versions
* Use the version of retire on hackage
The new version is now released
* Don't use allow-newer: *:*
* ghcide-tests: Enable test no longer broken in ghc9
* Update hiedb version for ghcide
* Adjust for a minor change in test output for ghc9
* Fix benchmark test for ghc9
Cabal-3.2 is not buildable on ghc9, but 3.4 is builable on older ghc.
* Mark minor issues as broken for ghc9
Ghc9 highlights both the constructor and the other fields
Maybe this should just be accepted and not seen as broken?
* haddock-comments-plugin: Ghc9 support
* hls-eval-plugin: Partial ghc9 support
* WIP: hls-eval-plugin: Partial ghc9 support
* hls-explicit-imports-plugin: Add ghc9 support
Now ignores any imports with Unhelpful locations,
since we can't make a map of SrcLoc
* hls-retrie-plugin: Add ghc9 support
* hls-hlint-plugin: Add ghc9 support
* Fix backwards compatability of hlint plugin
* Fix stack builds
(Broken by previous hlint fixes)
* Disable tests when their required plugins are disabled
Not all plugins are supported on ghc9 yet, but we
still want to run the tests for the supported parts
* ghc9: Fix module name plugin
* Add a stack file and run tests for ghc9 in ci
* Add missing packages to ghc-9 stack
* Resolve rebase issues
Maybe it's better to create merge commits instead?
* Allow newer for more packages so cabal stops complaining
These aren't really working, but since they are dependencies
of packages in the `packages:` section
the resolver won't allow us to build anything without this, even if
those plugins are disabled.
* Replace MIN_GHC_API_VERSION with MIN_VERSION_ghc
* Revert incorrect change to hlint code
* Remove remaining traces of GHC_LIB flag
* Add back ghc 9 to github workflow
* Revert "Add back ghc 9 to github workflow"
This reverts commit c465a1e51a.
* hie-compat: Add basic support for ghc-9.0.1
A tiny step towards #297
* hie-compat: Remove dependency on ghc-api-compat
* hie-compat: Add more backwards compatability
* Disable CI for ghc9
* Use newer version of apply-refact
* Don't needlessly duplicate code from ghc
* hie-compat: Reexport the original version of HieBin
* Don't include broken "allow-newer"s
* FIx stack build for ghc9
* Fix warning from imperfect merge commit
* Don't needlessly duplicate code from ghc
* hie-compat: Reexport the original version of HieBin
* Add missing ghc-api-compat
* Fix ghc9 build for ModuleName
* Add more conditionals on flags for tests
* Add a separate cabal.project file for ghc9
As far as I know, this is the only way to disable the packages who's
dependencies doesn't compile in GHC9 yet.
* Fix and re-enable CI for GHC9
* Remove accidental non-breaking space
* Fix CI build for ghc9
Since we are changing the flags for haskell-language-server,
which CI renames to hls,
we need to use the shortened name in those flags as well
* Run tests for ghc9 in CI
* Minor CI changes
* Use proper values when enriching hie
* Don't try to test hls-refine-imports-plugin on ghc9
* Update comment about ghc9 crashing on initDynLinker
* setSessionDynamicFlags to prevent ghc9 from crashing
The only way to set the dynamic linker is with the function `setSessionDynFlags`
so we call it with the result from `getSessionDynFlags` to give it a
(hopefully sensible) argument.
See also this commit:
18757cab04
* Revert "setSessionDynamicFlags to prevent ghc9 from crashing"
This reverts commit 4065ac8394.
That change made the "ghcide.cradle.muli" tests fail.
* Simplify logic in hls-hlint-plugin.cabal
* Add comment on OldRealSrcSpan
* Remove source overrides for non-ghc9 builds in cabal.project
* Remove commented out code
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
* Remove resolved question from comment
"This code is only concerned with extracting argument names, so I don't see how multiplicity would be relevant here"
https://github.com/haskell/haskell-language-server/pull/1649#discussion_r642606967
* ghc9: Update to latest version of LSP per
* cabal-ghc901.project: Remove commented out code
* Update the lsp commit hash for stack as well
* Use a version of lsp without haskell/lsp#326
That patch was causing test failures, but the issues
should be fixed for real at some point, so that patch can be incluede
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
* Update hackage index
* Update stack.yaml's
* Use ghc-8.10.4 for default stack.yaml
* Update brittany
* Bump up min apply-refact version
* Set max-backjumps to 12000
* Run plugins' test suites with server in the same process
* Use async
* Update CI
* Add rts options
* Sleep 0.5s after running a session
* Update CI
* Don't use withAsync
* Add timeout
* Cancel the server action when timeout
* Fix cwd
* Close input stream manually, add a lock
* cleanup
* tactics plugin
* Remove sleep
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* Class plugin
* Splice plugin, extract hlsCommand from hls-test-utils
* Haddock comments plugin
* Update github actions
* Remove invalid import
* Bump up specification version of package description to 2.4
* Fix hls.cabal
* Remove the build of eval plugin's testdata from circle ci
* Limit the parallelism of building test suites in circle ci
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* Extract hls-test-utils
* Use test utils in brittany plugin and stylish haskell plugin
* stack
* Set locale encoding to utf8 in defaultMain
* Remove with-utf8
* Update niv and nixpkgs
* Use nixos-unstable in CI
* Do not override mkDerivation
* Switch to nixpkgs-unstable
* Jailbreak only broken packages
* Update nixpkgs
* Better override
* Update nixpkgs
* Check whether the package is jailbroken, add comments
* Downgrade tracy to 0.7.5
* Update maintainer notes
* Extract a Brittany plugin
* Add the brittany plugin to all the stack descriptors
* Extract tests into a standalone testsuite
* Drop AGPL flag
* Change the default logger to print to stderr
* add hls-brittany-plugin test suite to CI
* Add strict version bounds
These are completely unnecessary, but it's the approach that we seem to be taking
* includes breaking API change: bump ghcide version number
Co-authored-by: Junyoung/Clare Jang <jjc9310@gmail.com>
* Ignore ci for some paths
* Run ci for all branches
* Ignore nix dir
* Update .github/workflows/bench.yml
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: Potato Hatsue <1793913507@qq.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
* [ghcide-bench] handle main modules
* [ghcide-bench] use gen-hie
* [benchmark] Add the HLS benchmark example
* Tweak down the number of components
* Update mergify conditions
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
* [benchmark] command line config argument
* [benchmark] Add a phony target for every example
* [benchmark] add config to toggle heap profiling
* [shake-bench] Phony rules for binaries
* [CI] benchmark jobs tree
* update mergify conditions
* Parallelize benchmarks
* [benchmarks] Collect heap profiles
* [benchmarks] pass RTS options to the real thing!
We were passing RTS options to the wrong thing
* Drop the 8.6.5 benchmark since the vanilla rts doesn't support +RTS -h
* Tone down timeout
* Review feedbacks
* [test-ci] fix wibble
* [ghcide-bench] fix scrambled output
* [ghcide-bench] add a new experiment: getDefinition after edit
* [ghcide-bench] refine the position used for identifiers
* [ghcide-bench] Support examples with multiple FOIs
* [ghcide-bench] Allow identifierP to be optional
* [ghcide-bench] experiments: do all edits first, then query
* [ghcide-bench] Add examples with multiple FOIs
* [ghcide-bench] add a completions (without edit) experiment
* [ghcide-bench] Fix indentation
* [ghcide-bench] Fix incomplete pattern match
* [ghcide-bench] Include the documentContents setup in the "startup" metric
* [ghcide-bench] fix wibble
* [ghcide-bench] add more verbose output
* [shake-bench] Consolidate -s code
* [bench-hist] Fix: depend on # samples
* [ghcide-bench] cache searchSymbol
* [cabal-bench] --no-clean
* Drop macOS benchmarks
* Drop macOS tests
* Really exclude Windows 8.6.4
It occasionally becomes much slower than the others and times out after 6h
https://github.com/haskell/haskell-language-server/runs/1626173853?check_suite_focus=true
* switch to haskell/actions/setup
actions/setup-haskell has been archived, haskell/actions/setup is the replacement
* use coarser cache keys
We are getting very few cache hits because we have too many caches and are
running over the 5GB per repository limit.
Each node in the matrix weighs around 350MB, so we can have up to 15 nodes. The
current matrix (after dropping macOS but before adding 8.10.3) has 12 nodes.
The `**/*.cabal` hash is wrong, since it also captures cabal files in tests
The `**/cabal.project` is wrong for the same reason, but it can be easily
fixed.
* Use more precise .cabal paths in test cache
* Reuse build cache in bench workflows and viceversa
* Reduce Nix builds to the bare minimum
We simply need to check that the Nix derivation works
* remove enable-stack
* Auto cancel redundant workflows
* Enable tests fail-fast
* Remove ghc-lib from matrix
Created #784 to restore it
* Invert the dependency between ghcide and hls-plugin-api
This PR includes changes both to ghcide and HLS to implement the reorg described in https://github.com/haskell/ghcide/issues/936#issuecomment-751437853
To summarise:
- `hls-plugin-api` no longer depends on ghcide.
- `ghcide` now depends on `hls-plugin-api` and exposes:
- The ghcide HLS plugin
- The `asGhcIdePlugin` adaptor
The goals are:
- to be able to break the `ghcide` HLS plugin down
- to rewrite exe:ghcide on top of the HLS plugin model.
The ghcide side is reviewed in https://github.com/haskell/ghcide/pull/963
If this change is accepted there are two further considerations:
- This would be a good moment to merge the 2 repos, so that there is no history loss.
- `hls-plugin-api` will need to be released to Hackage prior to merging https://github.com/haskell/ghcide/pull/963
* clean up
* Fix the ghcide plugin to include the rules
* clean up PartialHandlers definition
The ghcide partial handlers for completions, code actions and hover are not
really being used, since they get overriden by the `<> ps` append. This is due
to the right-biased semantics of `PartialHandlers`
* Move ghcide LspConfig into Ide.Plugin.Config
* Use HLS plugins in ghcide
For now there is only one, the main ghcide plugin. But this will allow us to
break it down in more fine grained plugins with parallel semantics, both for
execution and error handling
* Fix hlints
* Revert "Temporarily disable the upstream branch for benchmarks"
This reverts commit 7bb3c6efae.
* Disable the Windows 8.6.4 test
* Fix unrelated hlints
Not sure why these are triggering now.
Linting should be restricted to the Diff ...
* Add GitHub workflow for testing
* Add HLS_TEST_EXE env var to control which exe to test
* Pass -j1 flag to tasty when running tests on GitHub
* Enable stack in GitHub CI
* Update cabal
* Add HLS_WRAPPER_TEST_EXE
* Fix cache restore keys
* Try force language server to use utf8 locale
* Use patched hie-bios
* Remove debug print
* Lets find out what the windows locale encoding is
* Give up trying to fix the locale
* Add comment for -j1