-
Notifications
You must be signed in to change notification settings - Fork 698
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
cabal install run immediately after cabal build unnecessarily rebuilds the project #6919
Comments
I should mention that, while the above seems like suboptimal behavior, what I'm really wanting to do -- inexpensively symlinking the executable cabal has built to a place I need it -- is something cabal install seems ill-suited to. Other performance problems include it loading the cabal package list, building the sdist (a 1.7 mb compressed tarball in my case), probably more. What I'm probably going to use instead is |
Same here. This behavior makes me hesitant to embrace v2-cabal yet, still preferring v1-cabal. What would be a good workflow with v2-cabal?
but does not fly because the last step rebuilds everything---needlessly, it seems, isn't often copying/linking the executable all that is left to do? |
Context: @andreasabel
Which builds the package one time only. @joeyh |
Indeed I develop https://github.com/agda/agda and want to install the executables after each build in order to test interactive Agda development with the newest bug-fixes in emacs.
in the working directory to get Agda to build and be installed. Of course, I will have to invoke this command several times until all the compilation error are fixed. How do I proceed in v2? I would run For me, the
that performs the installation with binaries built by @phadej Since you ask what is holding me back from v2
the present issue is one that makes us stick to v1 in the Agda development. |
My feature request would be to have this option of
In the meantime, I have
which picks up the executable name from the
#!/usr/local/bin/gawk --file
# To use with "cabal v2-build", e.g.
#
# cabal build | tee >(copy-bins.awk)
#
# When "cabal build" outputs "Linking path/.../x/.../to/exe ..."
# we symlink this executable from our ".cabal/bin" directory.
match ($0, /^Linking (.+\/x\/.+) ...$/, res) {
# CONFIGURE ME
installdir = "~/.cabal/bin";
# Capture the regex group (...) in src
src = res[1];
# Create the symlink
ln_cmd = "ln -s -f "src" "installdir"/";
print("[COPY-BINS]", ln_cmd); # Tell what you are doing.
system(ln_cmd);
} |
If the |
Some discussion in #7297 (comment) and partially in #7693 (but please let's use this ticket for this topic) |
Please take a look at #7693 (comment), and feel free to respond here. Thanks! |
After the info posted in #7297 (comment) and my tests in #7745 about the differences between build local packages and installing them
i would say that
|
First, yes - to be useful, Second, right now What are the effects of |
Could you elaborate? (Best just point to ticket about that or open one).
Wrong ticket? |
No, an attempt to find a solution or a "working" workaround for this problem - when you build with I agree that |
This comment has been minimized.
This comment has been minimized.
ugh i missed rebuild the project, sorry |
Ping? |
@mouse07410: I'm afraid we haven't made any progress with designing |
Alas, nothing new. :-( |
It seems that two problems are brought up here:
Is there any progress in either of these two? |
I'm not aware of any progress, but I might have easily missed something. If you find any relevant ticket or a comment in another ticket, please kindly link here. |
Describe the bug
I have just run cabal build. No source files have changed. I run cabal install (with some options), and it rebuilds the entire project from scratch.
To Reproduce
I notice that, if I
cabal build exe:propellor
, thecabal install
does not re-build.The default
cabal build
of both executables and the library differing from what's it's being asked to install seem to be what causes the re-build. I think it should be possible to build everything and then only install part of what was build, without a rebuild.System information
The text was updated successfully, but these errors were encountered: