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

Support generated modules better #719

Closed
bos opened this issue May 24, 2012 · 1 comment
Closed

Support generated modules better #719

bos opened this issue May 24, 2012 · 1 comment

Comments

@bos
Copy link
Contributor

bos commented May 24, 2012

(Imported from Trac #729, reported by @dcoutts on 2010-08-21)

Currently Cabal's simple build system expects that all modules listed in the exposed-modules and other-modules have some original source file (possibly one that needs a preprocessor). There is a built-in hack for the generated Paths_pkgname module.

Adding other generated modules is rather tricky because of the assumption that an original source file can be found. This should not be too hard to fix for build, since we can just look for the generated source file in the build location, but it affects sdist more severely. There is no way for sdist to know if a file is generated or not, so if a source file is not found then currently it just fails. Unlike at build time, it's reasonable to run sdist in a clean build tree.

People can hack around it in the Setup.hs by filtering out the module name for various stages, but that is still tricky due to the combination of #410 and #627.

This affects some core ghc components and also darcs.

@ttuegel ttuegel added this to the _|_ milestone Apr 23, 2015
fmaste added a commit that referenced this issue Aug 11, 2016
Add new 'autogen-modules' field. This closes #3656 and  #719
@fmaste
Copy link
Collaborator

fmaste commented Aug 11, 2016

Closed with #3656 and #3670

@fmaste fmaste closed this as completed Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants