Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort out some compatibility issues #2511

Merged
merged 1 commit into from Dec 19, 2021
Merged

Conversation

alanz
Copy link
Collaborator

@alanz alanz commented Dec 19, 2021

mkPrintUnqualified needs a UnitEnv, I have no idea where to get one.
I suspect we could use a different print function, for the only place this is called.

@jhrcek
Copy link
Collaborator

jhrcek commented Dec 19, 2021

mkPrintUnqualified needs a UnitEnv, I have no idea where to get one.

UnitEnv is part of https://hackage.haskell.org/package/ghc-9.2.1/docs/GHC-Driver-Env.html#t:HscEnv and can be retrieved using hsc_unit_env :: HscEnv -> UnitEnv

@pepeiborra pepeiborra merged commit a1e6af1 into haskell:ghc-9.2 Dec 19, 2021
@pepeiborra
Copy link
Collaborator

Merging Alan's branch to the haskell one, further changes can be done there

michaelpj added a commit that referenced this pull request Jan 12, 2022
* 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 064a9b7.

* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE

This reverts commit 208f484.

* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE

This reverts commit ba4d618.

* 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 daf43c8, reversing
changes made to f951004.

* 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 4f016dd.

* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants