JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.66k stars 5.48k forks source link

error "package is dirty, bailing" on windows #4349

Closed JeffBezanson closed 11 years ago

JeffBezanson commented 11 years ago

I tried to switch to latest master of ZMQ on windows using Pkg.checkout("ZMQ",pull=true). I got "ERROR: ZMQ is dirty, bailing", but git status shows that the working tree is clean, and on a normal released version. Manually going to the directory and doing git checkout master followed by git pull worked.

StefanKarpinski commented 11 years ago

I'm starting to reach the point of closing this as "won't fix".

stevengj commented 11 years ago

Can we use the "lower-level" git diff-files instead?

vtjnash commented 11 years ago

@StefanKarpinski You've fixed it for windows. That's done. I'm just pointing out that the same problem exists on Linux, but only on obscure configurations, and would be fixed with the same patch.

StefanKarpinski commented 11 years ago

Oh, if this is only an obscure configuration on Linux then I'm closing this again. We explicitly do not support people doing random things with the configs of their git repos under .julia. That would basically be impossible to support. I'm pretty sure you can configure git so that running git push makes your computer sing the national anthem.

StefanKarpinski commented 11 years ago

Can someone on a buggy OS check if @stevengj's diff-files suggestion works?

vtjnash commented 11 years ago

I could configure sh to reformat my hard drive, then complain that starting multiple julia processes erased all my data. But that's not a documented option, nor is it as easy to fix.

As I said before, this patch already resolved the issue on windows, using the method described in the documentation, and doesn't need any more work there. I just found that it isn't a windows-only problem -- that config option can be set on a system level too on Linux. So the same fix may be desirable for all platforms.

StefanKarpinski commented 11 years ago

The trouble is that the fix is completely insane. It forks like twelve git processes just to see if a repo is dirty. It's better to just force the option to a non-broken state than do this everywhere.

StefanKarpinski commented 11 years ago

@karbarcca and others with systems where this is a problem, please test and see if the new solution works. Thanks for the suggestion, @stevengj. Hopefully this takes care of this business.

quinnj commented 11 years ago

Works for me.

arnfaldur commented 8 years ago

I had a problem with Tk.jl–on Mac OS X–claiming to be dirty after Pkg.checkout("Tk"). The solution was simply to run Pkg.rm("Tk") and then Pkg.add("Tk") if anyone encounters an equivalent issue.