Skip to content

"There were multiple candidates for the Cabal entry" warnings when building happy #4076

Closed

Description

@OlivierSohn

When building happy with stack (stack build, using this fork), stack issues these warnings:

Warning: There were multiple candidates for the Cabal entry " Parser 
         * C:\stack\src\Parser.ly 
         picking: C:\stack\src\Parser.hs
Warning: There were multiple candidates for the Cabal entry " AttrGrammarParser 
         * C:\stack\src\AttrGrammarParser.ly 
         picking: C:\stack\src\AttrGrammarParser.hs
[1 of 2] Compiling Main             ( C:\sr\setup-exe-src\setup-Z6RU0evB.hs, C:\sr\setup-exe-src\setup-Z6RU0evB.o )

How can I fix them?

Activity

  1. snoyberg commented on Jun 19, 2018

    @snoyberg
    Contributor

    It seems like we should update the logic in Stack that maps module names to path names with the following tweak: if there are two files related to a module name, and they are identical except for a different file suffix, and one of them ends in .hs or .lhs, assume that it's autogenerated and ignore it. Alternatively, maybe track both of those files, and simply don't warn.

    This should be a relatively straightforward change to the codebase, I'm labeling it as a newcomer friendly issue if someone wants to take a crack at it.

  2. added a commit that references this issue on Aug 8, 2018
    13c024f
  3. snoyberg commented on Aug 8, 2018

    @snoyberg
    Contributor

    I've added a commit to fix this on the pantry branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions