Remove build-depends from pkgDescrFieldDescrs #2072
Merged
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.
Remove the build-depends field from the top-level parser of Cabal files.
Why do I think this is OK? Two reasons:
Distribution/PackageDescription/Configuration.hs
runs, in which case the contents of the field get overwritten with the true dependency picks. We do consult the field for some package syntax checks but as I argue in Cabal.Distribution.PackageDescription.Check should be factored per component #2065 this the wrong place to try to do the check.build-depends
field already gets lifted up by special case code insectionizeFields
to propagate it to the stanzas, which is the true codepath how we account for these build-depends.Duncan would feel better if we ran this modification on Hackage to make sure it's good. But based on code reading and light testing, I think it's right.
Signed-off-by: Edward Z. Yang [email protected]