You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
various twitter discussions / DMs / Skype conversations.
I'd like to make a plea that you read this "NuGet Package Restore misconceptions" article by Jeff Handley of the NuGet team as it filled in / accentuated some key points for me. I don't think I was guilty of any of the misconceptions, but it leads into what I will say after the jump. If you're going to bother to read on, PLEASE read the link - there's no point in reading on without the context
So, my 'solution' is to attempt to write a compact guide to Paket that doesn't:
a) assume it can say "inspired by bundler" and not have that trigger 0-15 good things and 2-4 bad things dependeing on people's experience
b) does not work with detailed examples with a goal of having people read rather than scan it
c) have something that people are expected to read before anything.
i.e. if something that if there's evidence that any core point is missing from somone's understanding, that one could (either conceptually or really be told "Come back when you've read link or we have no shared understanding and we're going to find out in 20 mins time that there are massive broken assumptions)
Commandline tool used to download nugets/files across your entire repo consistently, add them to .vb/.fs/.csprojs. Has restore option so packages dont have to go into source control.
Fast, no mousing/waiting/clicking/progress dialogs, no angle brackets, no gratuitous diffs on updates. It Just Works with/without Xamarin/Visual Studio, Windows/Mono, C#/F#/VB. Updating to latest is up arrow, enter.
You'll especially like it if any of the following is true:
you use git
you are in Package Manager Console a lot
you sometimes feel you're spending too much time/clicks/mouse wheeling/managing merge conflicts on package updates and or scanning for ticks
Dev uses Paket when developing
paket.dependencies: Put paths, package names and version constraints in paket.dependencies file in a dir tree root.
$ paket update: Creates/validates a graph and saves resolved vers to paket.lock.
paket.references: In proj dirs, simple text file lists pakets used in .xxproj files
Use NuGet to maintain /packages. paket convert-from-nuget to suck Refs out of packages.config into Deps+Refs files.
Edit paket.dependencies or use $ paket add: Add file (\share, Http, GitHub, fssnip) or NuGet specs to deps, Write Lock, Add to Refs for a proj, put ref into a proj
$ paket update: Read paket.dependencies, Write Lock, Load Refs, Put <References into csprojs
Loop (can go back to -1 if you want - using paket does not preclude use of NuGet)
Add paket.dependencies, paket.lockpaket.references to source control. Add .nupkg files + DLLs in packages folder to either .gitignore or source control. Commit.
People cloning repo need exact same set of files dev was using but dev didnt commit entire packages folder
Fork repo.
paket install: read Lock, download .nupkg files iff not there, expand DLLs out of .nupkg zips
Load VS.
CI box iff not committing all packages folder
5: <build>.cmd/sh: paket install: Read Lock, download files not in /packages, expand DLLs.
6: Run msbuild/xbuild - no magic scripts slowing anything down
The first problem is that despite the fact that @shanselman
s fizzbin concept really spoke to me, it doesnt seem to have caught on at all
its not really googleable
@forki, who we can all agree is pretty well versed in dev and net slang hadnt heard of it
Only thing in its defence was that urban dictionary has it.
So, the title needs to change.
1000 words
@forki pointed out that a diagram was in order and will happen. It's definitely a key component, and should be used to cut out a lot of the words in the FizzBin
But nobody reads (anymore)
I'm acutely aware that nobody reads the manual. I had my misunderstanding core Paket concepts phase too (the docs were a lot less complete back then in my defence, but I am certain it would still apply).
The names of the files are good enough to convey their concepts
But I wanted to use Deps, Refs and Lock in the text above and if there was a core knowledge post I could.
Because nobody reads, the paket command names are absolutely critical
As an example, I questioned the name outdatedat one point - @agross indicated its the term bundler uses. I like prior art. But I still think news or something which doesnt feel like a cumbersome word in English which is part of a set of terms that are carefully aligned.
The proposal
Have you read the linked Jeff Handley article at the top yet? Close this thread and dont bother to read on if you havent. I'm serious.
So, about 40 mins into mowing the lawn the following hit me:
paket install needs to be renamed
The name needs to:
convey that its used in the build to restore the files
convey that it will not change things
not have the need to say "update and/or your first paket install when describing it
acknowledge the fact that NuGet is what a lot of people get their preconceptions from
ack that nothing is installed - no sln level init.ps1 or project level install.ps1 or uninstall.ps1 or MSIs like some people seem to ecpect
acknowledge that names that make a lot of sense in bundler
a) have no currency for lots of people (me and others)
b) can as easily cause misconceptions and trigger 1001 crazy notions in other peoples heads
like NuGet Package Restore, Paket doesn't readlly 'install' anything. It's not bundler - key example: bundler has environments
What is the name, I hear you ask? I've been jumping between two and have no idea how to choose.
paket restore
When all is said and done, aside from the wart of paket install also being update first time, does exactly the same as NuGet's restore subcommand.
Yes, except for the wart that it can also fixup a project that has changed its Refs file. But:
in a real build script you'd all-but want the command to fail-fast if it turned out that paket in stall was going to change a proj file (should that be an issue?)
When doing dev, you run it from time to time to fixup projects as you add refs.
BUT now we have paket add
AND its absolutely critical to REPL mode - but its hard to explain as its lower traffic and/or orthogonal to the core funcitonality of Paket (the stuff that overlaps with NuGet client) - see Make "Get package" available in REPL #124 and people thinking that Paket is a scriptcs like thing for F#
BUT thats difficult to doc wihtout a big sentence because it leans on too many other concepts
I dont expect people will like the name. But I think it will save a LOT of confusion relative to persisting with install.
IOW change paket install to paket restore or paket sync without much change - seem to fall between two stools?
Proposal 2: clear separate commands
Split paket install into:
paket restore
same as NuGet Restore
but complains if any proj files are broken (but maybe with a --hard to override?)
paket sync
same as paket install today, i.e. fixes up projs based on Refs but
will not download ever
tells you to use paket update if not all required packages are in lock (maybe with --freshen override)
IOW now high level workflow is that:
build scripts do paket restore ONLY
when you edit the Deps and want stuff reflected downstream, only update will ever do that
if you want to add a ref of something you are already using in the sln to a new proj, you can either
edit Refs file and paket sync
use paket add ref projdir PaketId command (maybe that should be paket ref ?) which does (only ) a paket sync implictly
use paket add dep NuGetPackageId (which will add a Dep, update and then (depending on --interactive adds refs to all projs or a subset)
I'd do the doc work (and a lot of the impl work if others dont want to) if anyone thinks this makes any sense.
Be warned I will start linking to this article up the wazoo for each misconception I encounter, esp if we don't fix this and/or people ignore this issue an :D
To summarise, we want cut off at the pass, having a cottage industry of complex prescriptive flows, PluralSight courses, and diagrams like:
While I like this diagram and I like the power of git, that's partially Stockholm Syndrome.
I dont like the success of Paket and/or our ability to explain to new users over time to be contingent on such complexity when it can be avoided by thinking hard about the problems and fixing things now. The ultimate thing we're think we're talking about is composability (and its friends DRY and rule of 2-3+ (which I believe I've demonstrated has been triggered...))
Wow @bartelink this time I'm totally sold on the get the names right theme of your writing! To keep things short: I definitely vote for your second proposal. Both restore and sync are great matches.
If there's a seconder (esp with a diff or two to suggest) I'll do a revision of the article (surely something about it is either unclear, redundant or missing ?)
I also tend to think that install is an unfortunate name. After I'm ready
with the new install model we will probably see what it really is. So long
I don't want to change it.
On Oct 3, 2014 11:04 PM, "bartelink" [email protected] wrote:
If there's a seconder (esp with a diff or two to suggest) I'll do a
revision of the article (surely something about it is either unclear,
redundant or missing ?)
—
Reply to this email directly or view it on GitHub #176 (comment).
Activity
bartelink commentedon Sep 28, 2014
Paket FizzBin
Commandline tool used to download nugets/files across your entire repo consistently, add them to
.vb/.fs/.csprojs. Has restore option so packages dont have to go into source control.Fast, no mousing/waiting/clicking/progress dialogs, no angle brackets, no gratuitous diffs on updates. It Just Works with/without Xamarin/Visual Studio, Windows/Mono, C#/F#/VB. Updating to latest is up arrow, enter.
You'll especially like it if any of the following is true:
gitDev uses Paket when developing
paket.dependencies: Put paths, package names and version constraints inpaket.dependenciesfile in a dir tree root.$ paket update: Creates/validates a graph and saves resolved vers topaket.lock.paket.references: In proj dirs, simple text file lists pakets used in.xxprojfiles/packages.paket convert-from-nugetto suck Refs out ofpackages.configinto Deps+Refs files.paket.dependenciesor use$ paket add: Add file (\share, Http, GitHub, fssnip) or NuGet specs to deps, Write Lock, Add to Refs for a proj, put ref into a proj$ paket update: Readpaket.dependencies, Write Lock, Load Refs, Put<Referencesinto csprojspaket.dependencies,paket.lockpaket.referencesto source control. Add.nupkgfiles + DLLs inpackagesfolder to either.gitignoreor source control. Commit.People cloning repo need exact same set of files dev was using but dev didnt commit entire packages folder
paket install: read Lock, download.nupkgfiles iff not there, expand DLLs out of.nupkgzipsCI box iff not committing all
packagesfolder5:
<build>.cmd/sh:paket install: Read Lock, download files not in/packages, expand DLLs.6: Run msbuild/xbuild - no magic scripts slowing anything down
bartelink commentedon Sep 28, 2014
Realizations from the article
FizzBin
The first problem is that despite the fact that @shanselman
s fizzbin concept really spoke to me, it doesnt seem to have caught on at all
Only thing in its defence was that urban dictionary has it.
So, the title needs to change.
1000 words
@forki pointed out that a diagram was in order and will happen. It's definitely a key component, and should be used to cut out a lot of the words in the FizzBin
But nobody reads (anymore)
I'm acutely aware that nobody reads the manual. I had my misunderstanding core Paket concepts phase too (the docs were a lot less complete back then in my defence, but I am certain it would still apply).
The names of the files are good enough to convey their concepts
But I wanted to use Deps, Refs and Lock in the text above and if there was a core knowledge post I could.
Because nobody reads, the paket command names are absolutely critical
As an example, I questioned the name
outdatedat one point - @agross indicated its the term bundler uses. I like prior art. But I still thinknewsor something which doesnt feel like a cumbersome word in English which is part of a set of terms that are carefully aligned.The proposal
Have you read the linked Jeff Handley article at the top yet? Close this thread and dont bother to read on if you havent. I'm serious.
So, about 40 mins into mowing the lawn the following hit me:
paket installneeds to be renamedThe name needs to:
paket installwhen describing itinit.ps1or project levelinstall.ps1oruninstall.ps1or MSIs like some people seem to ecpecta) have no currency for lots of people (me and others)
b) can as easily cause misconceptions and trigger 1001 crazy notions in other peoples heads
What is the name, I hear you ask? I've been jumping between two and have no idea how to choose.
paket restoreWhen all is said and done, aside from the wart of
paket installalso beingupdatefirst time, does exactly the same as NuGet'srestoresubcommand.Yes, except for the wart that it can also fixup a project that has changed its Refs file. But:
BUT now we have
paket addAND its absolutely critical to REPL mode - but its hard to explain as its lower traffic and/or orthogonal to the core funcitonality of Paket (the stuff that overlaps with NuGet client) - see Make "Get package" available in REPL #124 and people thinking that Paket is a scriptcs like thing for F#
BUT thats difficult to doc wihtout a big sentence because it leans on too many other concepts
I dont expect people will like the name. But I think it will save a LOT of confusion relative to persisting with install.
paket syncOK, so the roles of the
installcommand are:.nupkgsand other content)libportions intopackages.props.targets#101 ) expandingbuildportions intopackagessync!Conclusion
I'd like input from at least @forki @agross @ilkerde and @theimowski re what makes sense here.
I'll venture some ideas:
Proposal 1: Just a rename
IOW change
paket installtopaket restoreorpaket syncwithout much change - seem to fall between two stools?Proposal 2: clear separate commands
Split
paket installinto:paket restoresame as
NuGet Restorebut complains if any proj files are broken (but maybe with a
--hardto override?)paket syncsame as
paket installtoday, i.e. fixes up projs based on Refs butpaket updateif not all required packages are in lock (maybe with--freshenoverride)IOW now high level workflow is that:
paket restoreONLYupdatewill ever do thatpaket syncpaket add ref projdir PaketIdcommand (maybe that should bepaket ref?) which does (only ) apaket syncimplictlypaket add dep NuGetPackageId(which will add a Dep,updateand then (depending on--interactiveadds refs to all projs or a subset)I'd do the doc work (and a lot of the impl work if others dont want to) if anyone thinks this makes any sense.
Be warned I will start linking to this article up the wazoo for each misconception I encounter, esp if we don't fix this and/or people ignore this issue an :D
bartelink commentedon Sep 28, 2014
To summarise, we want cut off at the pass, having a cottage industry of complex prescriptive flows, PluralSight courses, and diagrams like:
While I like this diagram and I like the power of git, that's partially Stockholm Syndrome.
I dont like the success of Paket and/or our ability to explain to new users over time to be contingent on such complexity when it can be avoided by thinking hard about the problems and fixing things now. The ultimate thing we're think we're talking about is composability (and its friends DRY and rule of 2-3+ (which I believe I've demonstrated has been triggered...))
Another pertinent link :)
ilkerde commentedon Oct 3, 2014
Wow @bartelink this time I'm totally sold on the get the names right theme of your writing! To keep things short: I definitely vote for your second proposal. Both
restoreandsyncare great matches.@agross @forki ?
bartelink commentedon Oct 3, 2014
If there's a seconder (esp with a diff or two to suggest) I'll do a revision of the article (surely something about it is either unclear, redundant or missing ?)
forki commentedon Oct 5, 2014
I also tend to think that install is an unfortunate name. After I'm ready
with the new install model we will probably see what it really is. So long
I don't want to change it.
On Oct 3, 2014 11:04 PM, "bartelink" [email protected] wrote:
forki commentedon Jan 31, 2015
Restore is implemented, install has new semantics