Skip to content
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

Extra dep specified as git repo builds unnecessarily #1295

Closed
chreekat opened this issue Nov 6, 2015 · 9 comments
Closed

Extra dep specified as git repo builds unnecessarily #1295

chreekat opened this issue Nov 6, 2015 · 9 comments

Comments

@chreekat
Copy link
Member

chreekat commented Nov 6, 2015

On current HEAD of Snowdrift's master (ad236659f819eb220c282f35a4b04525a9fdc52b), the dependency ghci-runner is rebuilt after a 'stack clean':

$ stack clean
$ stack build
Snowdrift-0.1.4: unregistering (missing dependencies: ghci-runner)
ghci-runner-0.0.0.0: unregistering (local file changes: ghci-runner.cabal src/Dev/Runner.hs)
ghci-runner-0.0.0.0: configure
ghci-runner-0.0.0.0: build
ghci-runner-0.0.0.0: copy/register
Snowdrift-0.1.4: configure
Configuring Snowdrift-0.1.4...

Is this intended behavior?

If not, is this because both Snowdrift and ghci-runner have a source file 'src/Dev/Runner.hs'? But then why does it say that ghci-runner.cabal changes, too?

The stack.yaml:

packages:
- '.'
- location:
    git: https://github.com/chreekat/ghci-runner.git
    commit: bae5a558535087c8cc532da0fd192625361d8a25
  extra-dep: true
@chreekat
Copy link
Member Author

chreekat commented Nov 6, 2015

My mistake: "src/Dev/Runner.hs" only exists in ghci-runner. (Snowdrift has "dev/Runner.hs".)

So, there's still the question of why an extra-dep is rebuilt after 'stack clean', and why it thinks both ghci-runner.cabal and src/Dev/Runner.hs have changed when they are being pulled from a specific git revision.

@mgsloan
Copy link
Contributor

mgsloan commented Nov 6, 2015

Hmm, yeah, there does seem to be something weird here. Thanks for the report! Extra-deps usually don't get rebuilt after stack clean.

So, this must be something to do with it being a git repo. I figured maybe it's deleting the repo and recloning it, but that seems to not be the case.

@mgsloan mgsloan added this to the P2: Should milestone Nov 6, 2015
@chreekat
Copy link
Member Author

chreekat commented Nov 7, 2015

Yeah. You may have already noticed this as well, but when stack does
build the dep, it seems to do nothing other than re-copy the object files.

Besides the 3-second delay, it's also annoying because "stack build
--pedantic" bails on the dep when I don't really care about it right now. :)

On Fri, Nov 6, 2015 at 3:09 PM, Michael Sloan notifications@github.com
wrote:

Hmm, yeah, there does seem to be something weird here. Thanks for the
report! Extra-deps usually don't get rebuilt after stack clean.

So, this must be something to do with it being a git repo. I figured maybe
it's deleting the repo and recloning it, but that's not the case either.


Reply to this email directly or view it on GitHub
#1295 (comment)
.

@mgsloan
Copy link
Contributor

mgsloan commented Nov 7, 2015

Yup, that particular issue with --pedantic is tracked by #1292

@mgsloan mgsloan added blocked and removed blocked labels May 15, 2016
@mgsloan
Copy link
Contributor

mgsloan commented May 15, 2016

This will be resolved as a side-effect of #1265, so closing to track this concern under that issue.

@mgsloan mgsloan closed this as completed May 15, 2016
@mgsloan
Copy link
Contributor

mgsloan commented May 15, 2016

Ehh, may as well leave this open but in "blocked" status.

@chreekat
Copy link
Member Author

chreekat commented Oct 4, 2016

I thought #2596 might fix this, because it fixed something similar on the latest version of Snowdrift. But when I do the repro exactly as specified up top, the same behavior is expressed. I guess this isn't fixed yet.

  $ git checkout ad236659f819eb220c282f35a4b04525a9fdc52b
  $ stack clean
  $ stack build
  <...>
  $ stack clean
  $ stack build
➝ ghci-runner-0.0.0.0: unregistering (local file changes: ghci-runner.cabal src/Dev/Runner.hs)
  ghci-runner-0.0.0.0: configure
  ghci-runner-0.0.0.0: build
  ghci-runner-0.0.0.0: copy/register
  Snowdrift-0.1.4: configure
  Progress: 1/2^Cuser interrupt

@bitemyapp
Copy link
Contributor

bitemyapp commented Nov 12, 2016

I don't even need to do stack clean, my project does this almost every time I build.

screenshot from 2016-11-11 23-36-25
screenshot from 2016-11-11 23-36-15

Usually after I pop out of ghci and run make build.

Edit: disregard, found it:

screenshot from 2016-11-11 23-55-45

@mgsloan
Copy link
Contributor

mgsloan commented Mar 18, 2017

Old issue. Please open a new one or comment on #2796 if this is still happening.

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

No branches or pull requests

3 participants