Closed nh2 closed 6 years ago
Hmm, I don't understand how this can possibly happen. Hadrian does not interact with git
files in any way. It only looks at GHC files and at build artefacts in _build
, so it's not different from Make in this respect.
Running
clean
with Hadrian didn't help.
You shouldn't need to run clean
after manipulating the source tree with git
-- Hadrian is designed to reuse as much of the previous build as possible.
@nh2 Could you give me a precise list of commands to reproduce this problem?
it's not different from Make in this respect.
I don't know if this problem would occur with make, maybe it would happen there too?
Could you give me a precise list of commands to reproduce this problem?
Unfortunately the best I can provide is to run hadrian/build.stack.sh -j --configure --flavour=quickest inplace/bin/ghc-stage2.exe +RTS -qg
on https://github.com/ghc/ghc/commit/6f0df84a1a, then to checkout https://github.com/ghc/ghc/commit/0fa8aeccce, git submodule update --init
, and run the build command again (all on Windows).
You shouldn't need to run clean after manipulating the source tree with git -- Hadrian is designed to reuse as much of the previous build as possible.
I agree, that's why I'm filing it :)
I have a feeling this is somehow related to changing Hadrian from git subtree
to git submodule
, which happened a few days ago.
@snowleopard I think my commits are slightly too old for that, might not contain that change yet in their history.
@nh2 Trying to checkout the commit in question but getting strange errors:
$ git checkout 6f0df84a1ae56d29cc4bdf43af9421b735d025c5
fatal: reference is not a tree: 6f0df84a1ae56d29cc4bdf43af9421b735d025c5
$ git reset --hard 6f0df84a1ae56d29cc4bdf43af9421b735d025c5
fatal: Could not parse object '6f0df84a1ae56d29cc4bdf43af9421b735d025c5'.
I feel very dumb asking this but: what am I doing wrong? Maybe it's time to get some sleep :)
@snowleopard They are in my git remote.
git remote add nh2github git@github.com:nh2/ghc.git
git fetch nh2github
@nh2 Aha, I see, thanks! Running out of time today -- will try to look into this soon.
I couldn't reproduce this, so closing. My impression is that was a git issue, not Hadrian -- please reopen if I'm wrong.
Today I had a problem where after switching from commit https://github.com/ghc/ghc/commit/6f0df84a1a (on top of GHC 8.2.2) to commit https://github.com/ghc/ghc/commit/0fa8aeccce (on top of current 8.4 HEAD), I got the error:
which really looks like some old (submodule?) code is being used instead of the latest contents (I checked all submodules are up to date).
Running
clean
with Hadrian didn't help.Only
git clean -fdx
helped.Here's the full build output from my terminal (on mingw64 WIndows): hadrian-old-library-problem.txt