-
Notifications
You must be signed in to change notification settings - Fork 696
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
Ambiguous TargetSelector crash #6874
Comments
Turns out this is actually caused because there are two executables that build the same module, which in this case is indeed actually ambiguous. However it looks like the error is getting mangled and an internal one is thrown instead whenever the modules are located within a
In this test case, removing the hs-source-dirs and placing
|
Have you tried with current |
Yeah this is happening with 07c1a43 |
Write a test case :) |
These should have been returning an error message but instead were causing an internal error because disambiguateTargetSelectors was rendering syntax and rematching on it, which isn't equivalent. Due to the way syntaxForm1File renders, it does not add a FileStatus to its TargetStringFileStatus and so cannot be matched upon again. The fix is to just copy over the FileStatus from the match input. This fixes haskell#6874
PR created for fix. The reason why this was working with the case where there was no hs-source-dir was by coincidence --- since files |
These should have been returning an error message but instead were causing an internal error because disambiguateTargetSelectors was rendering syntax and rematching on it, which isn't equivalent. Due to the way syntaxForm1File renders, it does not add a FileStatus to its TargetStringFileStatus and so cannot be matched upon again. The fix is to just copy over the FileStatus from the match input. This fixes haskell#6874
These should have been returning an error message but instead were causing an internal error because disambiguateTargetSelectors was rendering syntax and rematching on it, which isn't equivalent. Due to the way syntaxForm1File renders, it does not add a FileStatus to its TargetStringFileStatus and so cannot be matched upon again. The fix is to just copy over the FileStatus from the match input. This fixes haskell#6874
These should have been returning an error message but instead were causing an internal error because disambiguateTargetSelectors was rendering syntax and rematching on it, which isn't equivalent. Due to the way syntaxForm1File renders, it does not add a FileStatus to its TargetStringFileStatus and so cannot be matched upon again. The fix is to just copy over the FileStatus from the match input. This fixes haskell#6874
Describe the bug
In the project haskell-language-server, calling
cabal repl exe/Arguments.hs
from the root directory will give this error:This is because a subproject
ghcide
which is included in the packages field ofcabal.project
also has a module in a folderghcide/exe/Arguments.hs
.This doesn't happen when calling
cabal repl exe/Arguments.hs
from insideghcide
.Steps to reproduce
Working on getting a minimal test case
Expected behavior
Presumably in this scenario,
cabal repl src/Arguments.hs
should resolve to thesrc/Arguments.hs
in the root project.System information
The text was updated successfully, but these errors were encountered: