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

gup --leave emits warning #13

Open
gkleen opened this issue Oct 25, 2017 · 3 comments
Open

gup --leave emits warning #13

gkleen opened this issue Oct 25, 2017 · 3 comments

Comments

@gkleen
Copy link

gkleen commented Oct 25, 2017

Should gup --leave really emit the x modified y directly-warning?

@timbertson
Copy link
Owner

Nope, it shouldn't

@gkleen
Copy link
Author

gkleen commented Nov 13, 2017

With a file b (with arbitrary content) and a buildscript b.gup with content as follows:

#!/usr/bin/env zsh

gup --leave

I get the following behaviour:

$ gup b
gup b
gup  b.gup modified ./b directly
$ gup b
gup b
gup  b.gup modified ./b directly

@timbertson
Copy link
Owner

I looked into this today. The clobbering stuff is a bit of a weird heuristic to try and balance annoyance with usefulness. Also it uses the previous build's state, not the current build. It does already suppress the warning if the previous build clobbered the target, but only for an update (gup -u).

The idea is that you'll mostly run gup target for a target you're modifying/testing, most other builds of a clobbering target should come from gup -u. And the warning is most useful when you're working on the target, just in case you didn't mean to make it clobber the output.

So long story short: it would take a fair bit of code (and a slight performance impact) to make this always work correctly for --leave, and it already doesn't warn if you use gup --leave and you gup -u your target. So it's a bug, but it's at most a nuisance and it will only appear on a clean build if you use gup -u.

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

No branches or pull requests

2 participants