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

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

Closed
OlivierSohn opened this issue Jun 11, 2018 · 2 comments

Comments

@OlivierSohn
Copy link

OlivierSohn commented Jun 11, 2018

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?

@snoyberg
Copy link
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.

@snoyberg
Copy link
Contributor

snoyberg commented Aug 8, 2018

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

snoyberg added a commit that referenced this issue Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants