-
Notifications
You must be signed in to change notification settings - Fork 697
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
Disable library building, only build other components #2775
Comments
After working through the codebase, it seems like one part of this is in fact supported: This addresses some of my need, but I do still need a way to disable building the library. |
And after a little more experimentation: this is specifically in the case where the executable/test suite/benchmark depends on the local library. Nonetheless, for that case, I'd like the ability to turn off rebuilding of the local library and use the already built copy. Figuring out a fix for the cabal_macros.h issue would go a long way to making such a change unnecessary. |
Afaik yes, but you can be more explicit by saying /cc @dcoutts |
The macros issue is #1893, there's a patch in the works. |
The macro issue has been fixed in HEAD. If you still want to build an executable against an external copy of the library, I feel that #3286 should solve this case. |
…#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#3287) --one-shot lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#2775 (haskell#3287) --assume-deps-up-to-date lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#2775 (haskell#3287) --assume-deps-up-to-date lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#2775 (haskell#3287) --assume-deps-up-to-date lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…askell#2775 (haskell#3287) --assume-deps-up-to-date lets you compile a single component without building its dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
…fix to haskell#2775 (haskell#3287)" This reverts commit 85a76c9.
…fix to haskell#2775 (haskell#3287)" This reverts commit 85a76c9.
(I may be missing something obvious, in which case, please let me know how this should be handled.)
When you specify components, you can get fine-grained control over which executables are built. However, there seems to be no way to control the library component. This has a number of repercussions:
cabal build
will build all components--enable-tests
or--enable-benchmarks
can modify the cabal_macros.h file, building your library and then rebuilding with test suites enabled can force the entire library to be recompiled, even though that's not necessary (this may actually be worth opening as a separate bug report).Backwards compatibility will be a problem for any changes we want to make here. Ideally, I'd have said that
lib
is its own component, and a commandcabal build lib
would build only the library, whereascabal build exe:foo
would not build the library. However, the latter would be a breaking change. So perhaps we can add a--no-build-library
flag?(And I've referred to
cabal
the executable here, but I'd really like to see this in Cabal-the-library.)The text was updated successfully, but these errors were encountered: