Skip to content

Pull PackageDescription from readDesc #3491

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

Closed
wants to merge 1 commit into from

Conversation

thumphries
Copy link
Collaborator

Overriding readDesc doesn't quite work; there are a few spots that ignore the stashed value and read the .cabal file again from disk, notably cleanAction and sdistAction. This means defaultMainNoRead doesn't work properly for clean or sdist.

  • Respect readDesc when it is defined, instead of re-reading the cabal file from disk
  • Provide defaultMainWithHooksNoRead shorthand, this is helpful

@thumphries
Copy link
Collaborator Author

Apologies for submitting this PR prematurely, I was having trouble testing (Setup.hs kept being run against the system Cabal). If there's anything I can do to improve it, please let me know.

@ezyang
Copy link
Contributor

ezyang commented Jul 9, 2016

LGTM.

But perhaps readPackageDescription deserves a comment telling you to look at readDesc when you invoke it.

@ezyang
Copy link
Contributor

ezyang commented Jul 11, 2016

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants