-
Notifications
You must be signed in to change notification settings - Fork 796
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
hint test failures #4668
Comments
Sorry, but I no longer maintain hint. See haskell-hint/hint#47. Multiple people have admin access to the repo though, and any one of them can take over the package publishing. It's probably going to be easiest if you file an issue there. |
I can reproduce the problem on my machine: |
I now see that my
|
While So what has changed between now and then? Perhaps the version of stack? The CI logs do not mention which version of stack was used at the time, but since it was downloaded from https://www.stackage.org/stack/linux-x86_64, presumably it was the version which was the latest at the time (December 2018), so stack |
Indeed, the stack's changelog says the changes should be mostly backwards compatible, so I guess this is a regression in stack? |
The stack changelogs do list some user-visible changes. This one seems relevant:
|
Here is another entry in the changelog which seems extremely relevant:
Neither
|
I found a more comprehensive list of the relevant environment variables. Here are their values.
|
It was indeed Before using this as a permanent fix, however, I would like to read more about |
Unsetting |
Aha! stack creates an environment which only includes the packages listed in the |
ghc uses the GHC_ENVIRONMENT variable to find environment files describing which packages are visible. When running the tests using "cabal test", no environment file is created and GHC_ENVIRONMENT remains unset. ghc nevertheless has access to a number of default packages, including containers, so the test which imports Data.Map succeeds. When running the tests using "cabal v2-test", a local environment file is created, but GHC_ENVIRONMENT remains unset. ghc nevertheless finds the environment file, which includes all the dependencies listed in the .cabal file and also all their recursive dependencies, including containers, so the test which imports Data.Map succeeds. When running "stack test" using stack 1.9.3, no environment file is created and GHC_ENVIRONMENT remains unset. So, depending on whether a local environment file has been created by a previous run of "cabal v2-test", one of the two scenarios above occurs, and the test succeeds. When running "stack test" using stack 2.1.1, a temporary environment file is created in a temporary directory, and GHC_ENVIRONMENT points to it. That environment file inludes all the dependencies listed in the .cabal file, but _not_ their recursive dependencies. Since containers was not listed in the .cabal file, the test which imports Data.Map failed. This commit fixes the problem by adding containers to the .cabal file. See commercialhaskell/stackage#4668 for details.
ghc uses the GHC_ENVIRONMENT variable to find environment files describing which packages are visible. When running the tests using "cabal test", no environment file is created and GHC_ENVIRONMENT remains unset. ghc nevertheless has access to a number of default packages, including containers, so the test which imports Data.Map succeeds. When running the tests using "cabal v2-test", a local environment file is created, but GHC_ENVIRONMENT remains unset. ghc nevertheless finds the environment file, which includes all the dependencies listed in the .cabal file and also all their recursive dependencies, including containers, so the test which imports Data.Map succeeds. When running "stack test" using stack 1.9.3, no environment file is created and GHC_ENVIRONMENT remains unset. So, depending on whether a local environment file has been created by a previous run of "cabal v2-test", one of the two scenarios above occurs, and the test succeeds. When running "stack test" using stack 2.1.1, a temporary environment file is created in a temporary directory, and GHC_ENVIRONMENT points to it. That environment file inludes all the dependencies listed in the .cabal file, but _not_ their recursive dependencies. Since containers was not listed in the .cabal file, the test which imports Data.Map failed. This commit fixes the problem by adding containers to the .cabal file. See commercialhaskell/stackage#4668 for details.
I have pushed a fix upstream, but I did not release a new version of hint. Since the fix only touches the @mvdan, could you grant me maintainer privileges for the hint package? https://hackage.haskell.org/package/hint/maintain tells me I don't have access. |
@gelisam sure, done. |
Thanks. Unfortunately, it looks like adding a new dependency is not a change which can be done as a hackage revision after all, so we'll have to release a new version. @mvdan, I ran the tests, I've bumped the version, I added an entry to the changelog, and I tagged the commit, is there anything else I need to do publishing a new version? |
@gelisam That's pretty much it. I also add the changelog info to GitHub's releases page, but that's up to you. I've also been using semver (x.y.z without a fourth number) since I picked up the package, but I don't think that's terribly important :) |
@mihaimaruseac fixed upstream, please upgrade to hint-0.9.0.1. The change is definitely backwards-compatible: all I did was to add |
Awesome. Thank you @gelisam and sorry for being silent the past week. Real life took over |
Let's try it out. |
CC @mvdan
The text was updated successfully, but these errors were encountered: