Skip to content

Can't upload to hackage: Duplicate module found #795

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

Closed
stites opened this issue Oct 30, 2018 · 3 comments
Closed

Can't upload to hackage: Duplicate module found #795

stites opened this issue Oct 30, 2018 · 3 comments

Comments

@stites
Copy link

stites commented Oct 30, 2018

I have an exposed module which is exported conditionally with a cabal flag with a cabal file that is generated via the dhall-lang/dhall-to-cabal project (latest version: 1.3.1.0). The output of dhall-to-cabal compiles to cabal perfectly fine and I can build the project with cabal v2-build, but when attempting to upload a Package Candidate, I get Duplicate modules in library: Torch.FFI.TH.NN.Double.

Is there a mismatch between cabal and hackage-server that needs to be addressed or should I be filing an issue at the dhall-to-cabal repo?

@gbaz
Copy link
Contributor

gbaz commented Oct 31, 2018 via email

@hvr
Copy link
Member

hvr commented Oct 31, 2018

@stites does your package description by any chance have this form here: haskell/cabal#4629 ?

@stites
Copy link
Author

stites commented Oct 31, 2018

@gbaz -- Thanks for letting me know! cabal check does find this error and I was unaware of this feature!

--

@hvr -- Yes, that is exactly the issue. The generated cabal file looks something like:

    if flag(lite)
        
        if flag(with_nn)
            exposed-modules:
                Torch.FFI.TH.NN.Double
        else
    else
        ...
        if flag(with_nn)
            exposed-modules:
                Torch.FFI.TH.NN.Float
                Torch.FFI.TH.NN.Double
        else

I'll close this now since it is just a duplicate of haskell/cabal#4629

@stites stites closed this as completed Oct 31, 2018
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

3 participants