Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Drop stack support for GHC 8.2.2 #1430

Merged
merged 4 commits into from
Oct 31, 2019

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Oct 29, 2019

This is necessary, because when we upgrade cabal-helper,
and transivitely cabal-plan to version 0.5.0.0 in #1126,
the minimum cabal-version is 2.2.
However, each stack snapshot ships with its own version
of cabal-install that can not be changed.

The latest lts for ghc-8.2.2 is 11.18, which ships with
a cabal-install version of 2.0.0.1, which is too old
for cabal-plan 0.5.0.0.

However, in general, there is nothing that forces us to
drop support for GHC 8.2.2. Overriding the compiler version
should be possible, e.g. taking the snapshort 14.8 and
overriding the GHC version, but this requires us
to do manual constraint solving. Could be done if needed.

closes #1425

Copy link
Collaborator

@alanz alanz left a comment

Choose a reason for hiding this comment

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

To me it has been a matter of time before this happens.

This is necessary, because when we upgrade cabal-helper,
and transivitely cabal-plan to  version 0.5.0.0 in haskell#1126,
the minimum cabal-version is 2.2.
However, each stack snapshot ships with its own version
of cabal-install that can not be changed.

The latest lts for ghc-8.2.2 is 11.18, which ships with
a cabal-install version of 2.0.0.1, which is too old
for cabal-plan 0.5.0.0.

However, in general, there is nothing that forces us to
drop support for GHC 8.2.2. Overriding the compiler version
should be possible, e.g. taking the snapshort 14.8 and
overriding the GHC version, but this requires us
to do manual constraint solving. Could be done if needed.
@fendor fendor force-pushed the drop-stack-ghc-8.2.2-support branch from 259f0e5 to 339dce3 Compare October 29, 2019 21:46
Copy link
Collaborator

@lukel97 lukel97 left a comment

Choose a reason for hiding this comment

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

If we’re dropping the snapshot then we might as well drop building with 8.2 entirely, as it won’t get installed in the install script. From what I remember as well there’s a couple of semi group related CPP parts we have for 8.2 which would be nice to drop

@jneira
Copy link
Member

jneira commented Oct 30, 2019

I assume that most users could use a ghc version greater than 8.2, but cabal is still able to build with ghc-8.2.2, no? (this is the cabal.project.freeze for cabal freeze -w ghc-8.2.2). stack can't do it due its more reproducible but rigid snapshots.
So build with cabal could be still a workaround for users that have to use it (if we dont remove those cpp's conditions).
Until hie could be used with ghc-8.8 we will support only two main versions of ghc... 🤔

@alanz
Copy link
Collaborator

alanz commented Oct 30, 2019

Until hie could be used with ghc-8.8 we will support only two main versions of ghc... thinking

@jneira we will just have to put up with that, people using the older GHC can still use the last hie that supported it.

And I think cabal-plan-0.5.0.0 cannot be built with the older cabal, and won't build with the newer one and GHC 8.2. I remember trying to do that, and coming to the conclusion that we had to drop it.

It has been a second class citizen for some time, running with older versions of things like hlint.

Copy link
Contributor

@samuelpilz samuelpilz left a comment

Choose a reason for hiding this comment

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

8.2.2 is cited a few times inside the test folder. The cpp call MIN_VERSION_GLASGOW_HASKELL(8,2,2,0) should be upgraded?

@fendor fendor force-pushed the drop-stack-ghc-8.2.2-support branch 3 times, most recently from 2149e51 to a5b44db Compare October 30, 2019 15:41
@fendor
Copy link
Collaborator Author

fendor commented Oct 30, 2019

One more review, now deletes all legacy code that was necessary for compatibility with GHC 8.2.2. Including tests, dependencies in .cabal files and CI.

Copy link
Collaborator

@alanz alanz left a comment

Choose a reason for hiding this comment

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

Very minor nitpicks of left over comments

hie-plugin-api/Haskell/Ide/Engine/Compat.hs Outdated Show resolved Hide resolved
hie-plugin-api/Haskell/Ide/Engine/Compat.hs Outdated Show resolved Hide resolved
@fendor fendor force-pushed the drop-stack-ghc-8.2.2-support branch from 66c86d4 to 7fb438c Compare October 30, 2019 21:39
@fendor fendor requested a review from alanz October 30, 2019 21:39
Copy link
Collaborator

@alanz alanz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@samuelpilz samuelpilz left a comment

Choose a reason for hiding this comment

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

Files still containing 8.2.2:

test/wrapper/HieWrapper.hs
test/unit/GhcModPluginSpec.hs

@fendor
Copy link
Collaborator Author

fendor commented Oct 30, 2019

HieWrapper tests are simple tests that check that the correct ghc version is discovered, no change necessary.
GhcMod had one unused CPP pragma, which I fixed, and there is a GHC version check in a comment, which I would not like to delete.

@fendor fendor force-pushed the drop-stack-ghc-8.2.2-support branch from 7fb438c to 8f66e28 Compare October 30, 2019 23:13
@alanz
Copy link
Collaborator

alanz commented Oct 30, 2019

I am happy for this to land when CI passes

@fendor fendor merged commit 7cf1295 into haskell:master Oct 31, 2019
This was referenced Oct 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop stack support for GHC 8.2.2
5 participants