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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for GHC 9.0 and 9.2 #300

Merged
merged 11 commits into from
Jul 29, 2021
Merged

Add compatibility for GHC 9.0 and 9.2 #300

merged 11 commits into from
Jul 29, 2021

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Jul 6, 2021

Avoids dependency on ghc-api-compat so that hie-bios can actually be uploaded to Hackage.

Additionally, moves parseTargetFiles to Gap.hs since GHC 9.2 exposes the function we want 馃帄.

supersedes #285

@fendor fendor requested review from mpickering and jneira July 6, 2021 10:04
@jneira
Copy link
Member

jneira commented Jul 7, 2021

It would be great make haskell gha download the ghc-9.2 prerelase to test it in ci (maybe it is possible? ghcup can install the ghc prerelase and gha uses ghcup under the hood)

@fendor
Copy link
Collaborator Author

fendor commented Jul 8, 2021

Related: haskell/actions#55

I would like to avoid implementing custom support, so I would wait for this feature to be implemented.

@jneira jneira mentioned this pull request Jul 29, 2021
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this double support

@fendor fendor merged commit 3703788 into haskell:master Jul 29, 2021
@jneira jneira changed the title Add compatbility for GHC 9.0 and 9.2 Add compatibility for GHC 9.0 and 9.2 Aug 26, 2021
@jneira
Copy link
Member

jneira commented Aug 26, 2021

@fendor could we get a hackage release with 9.0 support? thanks!

Comment on lines +415 to +426
#if __GLASGOW_HASKELL__ >= 902
-- Copied from GHC, do we need that?
addWay' :: Way -> DynFlags -> DynFlags
addWay' w dflags0 =
let platform = targetPlatform dflags0
dflags1 = dflags0 { targetWays_ = Platform.addWay w (targetWays_ dflags0) }
dflags2 = foldr setGeneralFlag' dflags1
(Platform.wayGeneralFlags platform w)
dflags3 = foldr unSetGeneralFlag' dflags2
(Platform.wayUnsetGeneralFlags platform w)
in dflags3
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, we don't need this in later GHC versions, as we can use GHC.Driver.Session.setDynamicNow directly.

fendor added a commit to fendor/hie-bios that referenced this pull request Aug 30, 2021
* Make hie-bios compile with GHC-HEAD

* Adapt hie-bios to compile with GHC HEAD

* Add allow-newer to get a build plan

* Bump up ghc upper bound

* Update ghc head to 9.0

* Use ghc-api-compat head

* Adjust some defs to 9.0.1

* Add ghc-api-compat to exe component

* Remove updated libraries

* Fix some definitions

* Add compatibility for GHC 9.2

Co-authored-by: jneira <atreyu.bbb@gmail.com>
(cherry picked from commit 3703788)
fendor added a commit to fendor/hie-bios that referenced this pull request Aug 30, 2021
* Make hie-bios compile with GHC-HEAD

* Adapt hie-bios to compile with GHC HEAD

* Add allow-newer to get a build plan

* Bump up ghc upper bound

* Update ghc head to 9.0

* Use ghc-api-compat head

* Adjust some defs to 9.0.1

* Add ghc-api-compat to exe component

* Remove updated libraries

* Fix some definitions

* Add compatibility for GHC 9.2

Co-authored-by: jneira <atreyu.bbb@gmail.com>
(cherry picked from commit 3703788)
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