Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Filter autogen files (such as Paths_foo) from exposed-modules when running sdist #1110

Merged
merged 1 commit into from Nov 15, 2012

Conversation

Projects
None yet
3 participants
Contributor

stepcut commented Nov 14, 2012

...g sdist. Previously autogen files were only filtered from other-modules.

@stepcut stepcut Filter autogen files (such as Path_foo) from exposed-modules when run…
…ning sdist. Previously autogen files were only filtered from other-modules.
d273465
Owner

tibbe commented Nov 14, 2012

Could you please remind me why this is needed. Is it because we're supposed to build that module on the user's machine, not when creating the sdist?

Contributor

stepcut commented Nov 15, 2012

Yes. The Paths_foo module is generated by the 'cabal build' phase. If you list Paths_foo in the exposed-modules section and run the sdist target with out this patch you get:

$ cabal sdist
Warning: Cannot run preprocessors. Run 'configure' command first.
Building source dist for happstack-fay-0.1.0.0...
cabal: Error: Could not find module: Paths_happstack_fay with any suffix:
["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"]

When I asked dcoutts about this, he thought that we were already filtering Paths_* from exposed-modules list, but then realized that it was only filtered by the other-modules list.

With my patch applied, sdist succeeds. I can then copy the the generated .tar.gz to another directory, extract it, and successfully build the package. That empirically leads me to believe it is probably the right thing to do?

@tibbe tibbe merged commit d273465 into haskell:master Nov 15, 2012

Member

dcoutts commented Nov 15, 2012

@stepcut sorry, confusion after our previous conversation. I'd started writing the same patch. I see yours is just as good as mine so that's all ok.

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