-
Notifications
You must be signed in to change notification settings - Fork 525
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
Package Common Sense Mode #166
Comments
http://fsprojects.github.io/Paket/nuget-dependencies.html#Path-sources this would probably work |
@forki But I dont want to manage such a mirror. I want the packages in the And Paket has all the info/control it needs to work from the packages folder without any such mucking about and indirection on my behalf. |
just do the following:
still add /packages to gitignore. Done |
And depending on the maturity of a project and/or the contributors' styles, one might just rely on NuGet caching for a bit and then 'flick the switch' by saying |
@forki But
|
@forki that's exactly what I'm doing right now, but it would be awesome if Paket could automatically maintain the |
so what you want is a second cache level which contains only installed packages and is customizable? |
@forki No. Paket needs Pakets. It needs them to When it There is zero value in having 2 copies of the nupkgs and/or the potential for them to lose sync. The NuGet cache/download pipeline will, over time (as you've already accomodated) offer different resiliency options. The download schemes from github / fssnip can do their own stuff too. Paket has the overview of all dependencies and I'm not trying to introduce any new thing requiring new work. If you re-read the main post and/or I fix whatever confused you, you'll see... :D The proposal is, in summary:
Some of my conventions presuppose some of the architecture in #154 in terms of unifying all the other things BUT right now, this scheme is extremely implementable for NuGet packages without any drastic messing about in the core impl of Paket. OK, no more editing this comment! UPDATE: cut/paste of side conversation
It will have the effect of being a second level cache But its a primary thing which will be doing double duty caches keep copies and coordinate stuff #154 keeps everything consistently in one place #166 says "add a .gitignore rule and inject stuff in VS which can tell you to go away if you only have the `.nupkgs'" |
I don't see why package restore and your .gitignore convention won't work together. |
@forki As in NuGet Package Restore ? Ah, might just work! .. HEY WAIT - there's no (Was typing) Of course, if someone can think of a way for (the same way new versions of NuGet work) for VS to trigger a OK, so I don't know my I assume that can be expressed as a single one liner rule. Does it make sense for Paket to look at @vasily-kirichenko @rneatherway any ideas ? |
|
@forki 1: Concievably a 2: Re MSBuild targets main thing is to have a consistent can clear message that is searchable and/or points to doc and tells them to run paket install In my experience its absolutely critical for people to never end up with an inconsistent project load as people are not always awake and/or understand WTH is going on in proj files. But it def doesnt need to be high-tech. Just predictable - breaking, not bending if you will :) 3: Separate MD is cool with me - its def a concept that needs to be laid out with examples that I'm clearly not in a position to give! And now, about that #154 elephant in the room :P |
can anyone try to figure out the gitignore pattern? /cc @theimowski |
Probably: !*.nupkg AlexAlexander Groß On Thu, Sep 25, 2014 at 2:04 PM, Steffen Forkmann
|
Sorry for the brevity of previous comments, me and @bartelink were just throwing ideas around. Maybe we didn't even mean the same thing. @forki I'm not sure whether it's a good idea to checking things from the Then you put something like this in your NuGet.config next to your solution (.sln)
I think nuget restore should automatically pick it up, if not explicitly pass it via Using the curated, local mirror approach you can keep using package restore like normal. That's how I do it currently, but I have to manually copy the nupkgs to my feed mirror directory. That's what I want paket to automate. Now, if paket does already unpack/install nupkgs, committing them to the packages directroy may be enough. The .gitignore would then need to exclude every 2nd level subdirectory and below in the packages folder. With mercurial and glob syntax (not a git fan here, so may need translation):
That leaves the nupkg files and the odd readme/license. I did actually try that approach first, committing packages//.nupkg, but that didn't play well using nuget restore, which would clame it had done its job while not unpacking the nupks. So, as I see it, there are two choices for paket:
Personally, I'm leaning towards the former. |
I only want to exclude them from within packages 2014-09-25 14:19 GMT+02:00 Alexander Groß [email protected]:
|
Put the gitignore in the packages directory. Or did I misunderstand you? AlexAlexander Groß On Thu, Sep 25, 2014 at 2:34 PM, Steffen Forkmann
|
but I want a global gitignore :-) |
Not a good idea, IMHO. Global breaks when you move things around. Violates DRY ;-) Does this work? packages/ AlexAlexander Groß On Thu, Sep 25, 2014 at 2:37 PM, Steffen Forkmann
|
@JohannesRudolph Lots of things to clarify. #125 makes a proposal to keep sources in a central place in a way that alludes to what you describe. But the most fundamental thing here is that
The proposal is that
There is no reliance on NuGet Package Restore and/or what versions 1-3 do in 9 releases of VS since VS2010SP1. The other thing is that Paket needs to own an autoritative set of creds and feed locations across all feeds inc fssnip, github, local files etc. BUT this is only used in 2b. Nothing else cares about the feeds. Paket Restore just works of a set of Pakets. In step 1 of #154, "set of Pakets" means
In step 2 of #154, "set of Pakets" means
|
@JohannesRudolph Based on the prev comments, I'd respond to your post as:
V likely :P
No mirror defs
Nobody will be using NuGet restore.
2b put them in
Have you tried Paket? There is nothing in NuGet's restore path that compares to the The builds are reproducable as you say coz 3 computed the graph and stashed it in the
Why? Does it handle multiple sources? If I am using an authenticated feed do I need to stash junk on my build machine? Does that accomodate non-NuGet sources?
You didnt put ticks around angle brackets, I guess?
Any Package restore stuff is stripped by
No mirrors. No caches. No cache invalidation. No curation. Persistence of outcome of a deterministic download process. With a priviso for the stuff to already be there due to commiting to source control.
@forki Could write a book NP. (And I've typed a book worth in contravention of @shanselman 's calls). MORE IMPORTANTLY: Paket does all the stuff to unzip, edit the projs etc. In a flash. @forki has implemented the entire process, hard as that may be to imagine (I have to say I had the same reaction in terms of not considering ny of this stuff as being remotely feasible, but the counterexample is right here in the repo). (To be clear: there are plently other contributors and it might have taken an extra while without them, but the core of thie impl of this aspect is from @forki)
Still ? Need to do a skype call if so :P |
@agross I was fearing that might be the answer :( Maybe a minion needs to get Just One More Little Feature into git if you are right :P |
ok I tried. I don't get gitignore to work. Even if I put it into subdir. If anyone want's to try it... |
@forki try this (see my above answer but I had the markdown wrong so it didn't show up). Works with mercurial.
|
@forki When Paket unzips, it lands the It would seem to me that @JohannesRudolph 's scheme can work if the install aspect consumes the |
see also (possible) discussion (later) today https://jabbr.net/#/rooms/fsharp |
Prompted by an IM from @JohannesRudolph:
I'd like to see alongside the Paket restore mode, a mode in which Paket in a consistent way:
.nupkg
files (downloaded source files would be serialized as.nupkg
s)[https://github.com/File dependencies from arbitrary URLs #114#issuecomment-56251073]packages/*.nupkg
is saved (the presence of the DLLs etc. is guaranteed idempotently bypaket install
) (but not subdirs - so it can tell if the files are not loaded, see below)This could detect that the packages are not expanded (due to
.nupkg
files only being in/packages
, and the canary one in/packages/.paket/expanded.nupkg
not being present).This would offer a middle way, addressing
I think an important thing is that in this mode, loading in VS is bad news - VS will silently half-load references and various other things and/or display other inconsistent behavior where DLLs do not exist.
Thus if each project had a target and/or failing import /
InitialTargets
or similar which could do a:<Error Text="This project uses Paket compacted mode (See http://). Please use
paket installto prepare the repository for use from Visual Studion" Condition=" EXISTS( '$(SolutionRoot)/packages/.paket/expanded.nupkg' ) />
(Maybe just an Import with the message above as a filename?)
The text was updated successfully, but these errors were encountered: