-
Notifications
You must be signed in to change notification settings - Fork 701
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
Solver DSL improvements #4028
Merged
Merged
Solver DSL improvements #4028
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eb9d4b5
Update solver unit tests for Buildable field.
grayjay 7d0b683
Refactor 'UnitTests.Distribution.Solver.Modular.DSL.exAvSrcPkg'.
grayjay 6dc0534
Run package checks on the GenericPackageDescription created by the so…
grayjay 0ada7ce
Fix build with GHC 7.8.4.
grayjay 4a70790
Fix solver-quickcheck failure.
grayjay cb6603a
Add comment about filtering package warnings in solver DSL.
grayjay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filtered out these two warnings because some unit tests test that the solver allows unknown extensions/languages when the compiler supports them. I don't know whether the unit tests or package checks are correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cabal hardcodes a list of known extensions and warns if it sees something it doesn't understand.
I think the reason we hardcode is because some extensions require special handling: e.g., TemplateHaskell. But the vast majority of extensions don't get any special handling. This raises an interesting question: for an extension we've never seen before, should we assume that it does or does not need special handling? If the former, the warning is appropriate; if the latter, we really ought to only define extensions which we do handle specially. But maybe this is too much for a simple PR like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. If most extensions don't need special handling, and we can get their names directly from the compiler, then it seems like it would be simpler to not define all of them.
I'll just add a comment to the line above for now.