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

Package hiding/unhiding still not completely stateless? #257

Open
edsko opened this issue Sep 13, 2014 · 3 comments
Open

Package hiding/unhiding still not completely stateless? #257

edsko opened this issue Sep 13, 2014 · 3 comments
Labels

Comments

@edsko
Copy link
Collaborator

edsko commented Sep 13, 2014

When running tests in parallel, occasionally we get test failures about hidding packages, which are not getting if we run the tests strictly sequentially (but with session reuse).

Unexpected errors: SourceError {errorKind = KindError, errorSpan = Baz.hs@4:1-4:35, errorMsg = "Failed to load interface for `Control.Parallel'\nIt is a member of the hidden package `parallel-3.2.0.4'."}

I don't understand why this should be the case -- surely hiding or unhiding packages should be local to the ghc session? Would either ghc or cabal change the visibility of packages in the global package DB?

@dcoutts
Copy link
Collaborator

dcoutts commented Sep 14, 2014

No, neither Cabal nor ghc make persistent changes to the visibility of packages in the database. GHC itself only ever reads package dbs (it does not have code to write them). Cabal only registers packages, it does not modify existing ones.

@edsko edsko changed the title Test failure "Module from hidden package" Package hiding/unhiding still not completely stateless? Sep 15, 2014
@edsko edsko added the bug label Sep 15, 2014
@edsko
Copy link
Collaborator Author

edsko commented Sep 15, 2014

In that case this must mean we still don't completely manage to reset ghc state correctly, though I don't know how or when. We have explicit tests for hiding and unhiding packages, as well as setting and unsetting -hide-all-packages, so I'm not sure what's going on here.

@mgsloan
Copy link
Contributor

mgsloan commented Aug 5, 2015

This is affecting the travis builds - see https://travis-ci.org/fpco/ide-backend/jobs/74153359#L554

I suspect the fix for #224 needs to be revisited.

For now I'm going to have the test always use --no-session-reuse. Yuck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants