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

Fix ambiguous file target selectors causing an internal error #6875

Merged

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Jun 5, 2020

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 #6874

@lukel97 lukel97 force-pushed the fix-ambiguous-target-selector-internal-error branch 2 times, most recently from 66c567f to f330202 Compare June 5, 2020 21:12
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
@lukel97 lukel97 force-pushed the fix-ambiguous-target-selector-internal-error branch from f330202 to 6bef4d3 Compare June 6, 2020 00:06
@lukel97
Copy link
Contributor Author

lukel97 commented Jun 6, 2020

Not sure why the macOS validate job keeps on getting cancelled. Can you retrigger it?

@phadej phadej merged commit 65d7cc6 into haskell:master Jun 6, 2020
@phadej phadej added this to the 3.4.0.0-rc1 milestone Jul 10, 2020
@phadej phadej mentioned this pull request Jul 10, 2020
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

Successfully merging this pull request may close these issues.

Ambiguous TargetSelector crash
2 participants