Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

hadrian/build.sh clean continues building Hadrian, instead of cleaning stuff up #249

Closed
thomie opened this issue May 11, 2016 · 13 comments
Closed

Comments

@thomie
Copy link

thomie commented May 11, 2016

make clean or hadrian/build.sh clean should preferably finish in a few seconds.

Scenario: a user has second-thoughts about starting their Hadrian-powered ghc build, or wants to still tweak some settings and start over.

The clean target should perhaps be implemented in a script.

@snowleopard
Copy link
Owner

A related issue: at the moment we are not cleaning the Hadrian executable (it cannot delete itself).

Once the move of all build results to buildRootPath is complete (#113) cleaning will be as simple as deleting the build directory.

@ndmitchell
Copy link
Collaborator

Is the goal of this to avoid compiling Hadrian itself? If so, I disagree - having the first clean take 1 min to compile Hadrian is no big deal, but having two sources of information or duplicating command line parsing is inadvisable.

@thomie
Copy link
Author

thomie commented May 11, 2016

Is the goal of this to avoid compiling Hadrian itself?

yes

having the first clean take 1 min to compile Hadrian is no big deal

it was a small annoyance to me

Priority lowest.

@snowleopard
Copy link
Owner

snowleopard commented May 11, 2016

Just to record here that there may be more complexity to clean than I previously thought:

Build system is IMO awful. It works fine, after a fresh clone ./boot && ./configure && ./make just works. But you can't:

  • Clean only stage2.
  • Clean only libraries.
  • Build only stage1/2 from the top level.
  • Build only the libraries.
  • Uninstall GHC.

Hopefully with new Shake-based build system I can at least implement these myself.

(From this reddit thread: https://www.reddit.com/r/haskell/comments/4isua9/ghc_development_outsidein/. The emphasis is mine.)

Cleaning only specific stages or only specific package(s) may be useful and easy implement in Hadrian, but I think it would be next to impossible to support this from within a script.

A script for cleaning everything (just by deleting _build) can be easily written by the user in their favourite script language. I don't think it is really worth to ship this trivial script together with the build system.

@izgzhen
Copy link
Collaborator

izgzhen commented May 5, 2018

@snowleopard I guess this is a wontfix?

@snowleopard
Copy link
Owner

@izgzhen Let's keep this open for now. I've marked it low priority. Perhaps this will become more important when we have more Hadrian users.

@alpmestan
Copy link
Collaborator

A lot of this should be significantly easier with the new build-dir structure though, right?

@snowleopard
Copy link
Owner

Yes, clean up is pretty easy now.

A special script even feels superfluous, since it's going to be just something like rm -rf _build.

@alpmestan
Copy link
Collaborator

Right. Except for those files created by boot and configure, which still live in the source tree.

@snowleopard
Copy link
Owner

True, we need to keep track of files produced by boot and configure, which is a bit annoying.

@angerman
Copy link
Collaborator

angerman commented May 8, 2018

If you really want to take care of boot and configure, I think the best option is to just invoke git clean -xfd. That of course requires a git checkout.

Maybe the question "What does one want to achieve with that clean step?" needs to be answered first.

@alpmestan
Copy link
Collaborator

Yeah, it should be answered first, because git clean -xdf would remove e.g new files that you have not yet registered in git.

@snowleopard
Copy link
Owner

I believe this issue is out of date, so closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants