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

0.4 test failure: Ambiguous module name ‘Data.HashSet’ #15

Closed
juhp opened this issue Nov 30, 2015 · 14 comments
Closed

0.4 test failure: Ambiguous module name ‘Data.HashSet’ #15

juhp opened this issue Nov 30, 2015 · 14 comments

Comments

@juhp
Copy link

juhp commented Nov 30, 2015

See commercialhaskell/stackage#1010

wagger2-0.4/src/Data/Swagger/Schema/Internal.hs:18:8:
    Ambiguous module name ‘Data.HashSet’:
      it was found in multiple packages:
      unordered-containers-0.2.5.1@unord_7E41cj9RvqSJeZ4jSnbs1a hashmap-1.3.0.1@hashm_622M1jMBjyMIwDJT1SEKMF
Test suite doctest: FAIL

Test failed in the Stackage Nightly for swagger2-0.4

@dmjio
Copy link
Collaborator

dmjio commented Nov 30, 2015

hashmap is deprecated, use unordered-containers if possible

@fizruk
Copy link
Member

fizruk commented Nov 30, 2015

I am not sure why this happens, given that hashmap is not in swagger2 dependencies.

Should we use PackageImports to explicitly specify unordered-containers?
I think that would fix the problem, but it seems weird to manually disambiguate a module that is not ambiguous when you consider dependencies in .cabal file.

@bergmark
Copy link

You are correct in that you shouldn't need PackageImports, strange error. I also queued swagger2 at http://matrix.hackage.haskell.org/package/swagger2

@bergmark
Copy link

Sorry I missed that this was the test-suite, so matrix won't help. But it did uncover other build errors

@fizruk
Copy link
Member

fizruk commented Nov 30, 2015

@bergmark I am sorry, but where can I find the error? I see no logs there.

@fizruk
Copy link
Member

fizruk commented Nov 30, 2015

The GHC 7.10 build error is weird because it refers to deriveJSON's generated code.
I see that it uses latest aeson-0.10.0.0, so I can probably fix it by setting an upper bound on aeson.

@bergmark how can I improve my Travis builds to catch this kind of errors before the release?

@bergmark
Copy link

I use https://github.com/hvr/multi-ghc-travis to test multiple GHC versions. Matrix essentially just does cabal install swagger2 so since travis starts with a clean sandbox it should give the same results.

@fizruk
Copy link
Member

fizruk commented Nov 30, 2015

I hoped for a stack-based version of multi-ghc-travis :)

Okay, will switch back to cabal-install then.

@fizruk
Copy link
Member

fizruk commented Nov 30, 2015

@bergmark what should I do about tests failure?
Am I correct that the problem was introduced by this swagger2.cabal diff v0.3–v0.4?

@bergmark
Copy link

Yes that seems correct. From the little I know about doctest it sounds plausible that it doesn't use packages dependencies properly and instead uses the whole packagedb. If so, a PackageImport would solve this. But it may be wise to ask the doctest developers as well.

fizruk added a commit that referenced this issue Nov 30, 2015
PackageImports extension fixes conflicts with hashset package
which should not arise since swagger2 does not have hashset in
its dependencies. But since doctest uses the whole packagedb,
this seems to be the best way of dealing with it for now.
See #15 for more details.
@fizruk
Copy link
Member

fizruk commented Dec 1, 2015

The GHC 7.10 build failure in matrix is due to aeson-0.10.0.0 bug (see haskell/aeson#293).
I am surprised it hasn't been released yet!

I have added an upper version bound for aeson in 9b3470d until the fix is released.

@fizruk
Copy link
Member

fizruk commented Dec 1, 2015

Closing this issue since both build problems should be fixed in v0.4.1.

@fizruk fizruk closed this as completed Dec 1, 2015
@juhp
Copy link
Author

juhp commented Dec 2, 2015

Thanks!

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

No branches or pull requests

4 participants