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

Stack 2.1.1 #1291

Merged
merged 6 commits into from Jun 16, 2019
Merged

Stack 2.1.1 #1291

merged 6 commits into from Jun 16, 2019

Conversation

alanz
Copy link
Collaborator

@alanz alanz commented Jun 15, 2019

Down to two problems, both in unit-test

  # To rerun use: --match "/GhcModPlugin/ghc-mod plugin/ghc-mod plugin commands(old plugin api)/runs the check command/"
  # To rerun use: --match "/Liquid/liquid haskell plugin/runs the liquid haskell exe/"

The liquid haskell one comes from installing liquid via cabal new-install liquidhaskell --with-compiler=ghc-8.2.2 and having the package path now set by stack, so the exe does not run properly.

The ghc-mod one has an extra diagnostic returned of the form ["Loaded package environment from /tmp/stack14358/test-ghc-env"]) where the exact directory changes with each test run. So we need to somehow get that path from stack while running the test, so we can plug it into the expected result.

@alanz alanz requested review from lukel97 and fendor June 15, 2019 19:06
@lukel97
Copy link
Collaborator

lukel97 commented Jun 15, 2019

So we need to somehow get that path from stack while running the test, so we can plug it into the expected result.

Can we get away with just checking the prefix of the diagnostic?

@alanz
Copy link
Collaborator Author

alanz commented Jun 15, 2019

Can we get away with just checking the prefix of the diagnostic?

I don't think so. It gets checked as part of a utility function, that calls the old and the new API, and does the one test by comparing generated JSON instances.

The other option is to filter out those reports in ghc-mod or its equivalent, they are incredibly annoying.

@alanz
Copy link
Collaborator Author

alanz commented Jun 16, 2019

I think the solution to the liquid haskell test is to move it into func tests, as it does work properly there.

Otherwise it fails when running with stack > 2.1
@alanz
Copy link
Collaborator Author

alanz commented Jun 16, 2019

One really beneficial effect of the new stack is it caches the entire snapshot. extra deps and all.

So blowing away .stack-work only causes the submodules and related to rebuild. This is especially great given the long compile times on ghc-lib-parser.

@alanz alanz merged commit 30908ee into haskell:master Jun 16, 2019
@alanz alanz added this to the 2019-06 milestone Jul 7, 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.

None yet

2 participants