Ian Lynagh <[email protected]> writes: [snip] > I doubt that making them "other" rather than "exposed" fixes whatever > problem Petr saw (which presumably is that building from a clean tree > doesn't work, but building from one in which Autoconf and ThisVersion > have already been generated does?).
Indeed. What I see with current mainline is this: 14:34:49 | m...@eri:~/dev/darcs/upstream -> runghc Setup sdist -v darcs changes --from-tag 2.2.0 --count darcs changes --from-tag 2.2.0 darcs changes --context Distribution quality warnings: 'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit and not just imposing longer compile times on your users. Creating dist/src (and its parents) Building source dist for darcs-2.2.0... Creating dist/src/darcs-2.2.0 (and its parents) Setup: Error: Could not find module: ThisVersion with any suffix: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"] So it is now impossible to build a distribution tarball from Cabal. I suppose one solution would be to call writeGeneratedModules in sDistHook and add dist/build/autogen to hs-source-dir. However: Distribution quality errors: 'hs-source-dirs: dist/build/autogen' points inside the 'dist' directory. This is not reliable because the location of this directory is configurable by the user (or package manager). In addition the layout of the 'dist' directory is subject to change in future versions of Cabal. => no-go. Googling around just brought this: http://www.nabble.com/How-to-expose-cabal-generated-installation-paths--td20659232.html but I wasn't able to figure what do actually do there. Even runghc Setup build does not help here, since the generated modules are under dist/, so aren't found anyway. And I also think it's a bad idea to distribute them anyway. Some ideas: 1 Move all ThisVersion and Autoconf references to darcs.hs. But, this can't really be done, since our "library" functionality prolly depends on things defined there. 2 Scrap Autoconf.hs and ThisVersion.hs like I did with my first cabalisation. Use CPP macros instead. We use them anyway. Still, there's no easy way to get rid of Context.hs, but it's not used in the library. Compromise anyone? 3 Generate files under src/ instead of under dist/. Very ugly. Unless anyone complains, I'll go ahead with 2 and post patches. Yours, Petr. -- Peter Rockai | me()mornfall!net | prockai()redhat!com http://blog.mornfall.net | http://web.mornfall.net "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton on the subject of C program indentation _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
