nim-lang / nimble

Package manager for the Nim programming language.
Other
1.24k stars 173 forks source link

Alleviate subtle gotcha regarding '#head' packages #332

Open dom96 opened 7 years ago

dom96 commented 7 years ago

I just installed nimble@0.8.4 and was wondering why its code was not being imported in choosenim (choosenim reuses Nimble's code for pure unadulterated awesomness). The reason was that I also had nimble@#head installed. At that point nimble@#head was actually older than nimble@0.8.4.

Should Nimble have given me a warning during the installation of nimble@0.8.4? Something like "hey, nimble@#head is now older than the one you just installed, wanna update #head?"

Araq commented 7 years ago

I think it's simply wrong to have multiple directories with $version appended, instead Nimble should control git repositories and use git checkout to get a specific version before builds. Nimble needs enforce some git tagging scheme for this to work though.

dom96 commented 7 years ago

Not every package is inside a git repo. This will be even more true in the future.

Araq commented 7 years ago

Well it can also be in a hg repo.

This will be even more true in the future.

No, it won't, version control is everywhere. And nimble can simply require a hg/git repo.

dom96 commented 7 years ago

No, it won't, version control is everywhere. And nimble can simply require a hg/git repo.

Yes, it will. Unless you want our packages site to host these git repos.

Araq commented 7 years ago

I don't understand this. Right now nimble uses git/hg to download packages.

dom96 commented 7 years ago

Yes, and this has a major problem. Packages can go missing at any second. We need a package site where we can upload packages to so that we can ensure they remain available.

Araq commented 7 years ago

The site should just fork or clone the originals. Why throw away information?

dom96 commented 6 years ago

So I think we can do that for the package site.

But something else to consider is speed. Won't having to checkout constantly be incredibly slow?