paket install --excludeversion
I want to bootstrap FAKE with Paket. In order to do this easily, I'd like to install FAKE without any version attached in path.
Right now I do:
NUGET=./.nuget/nuget.exe
FAKE=./packages/FAKE.Core/tools/FAKE.exe
[ ! -e $FAKE ] && mono $NUGET install FAKE.Core -ExcludeVersion -NonInteractive -OutputDirectory ./packages
mono $FAKE ./build.fsx "$@"
But I want to do:
FAKE=./packages/FAKE.Core/tools/FAKE.exe
[ ! -e $FAKE ] && paket install FAKE.Core --excludeversion
mono $FAKE ./build.fsx "$@"
Food for thought (optional considerations)
Maybe it makes sense to reword the --excludeversion flag to --bare, since I do not want Paket to track the package anywhere (no paket.deps / paket.lock entries). Example:
paket install FAKE.Core --bare
Another option would be to do this as a complete separate command, since it is a very distinct use-case. It just downloads and extracts the package, no more no less. I can imagine to name this command download or fetch. The resulting command would be
paket fetch FAKE.Core
Just recommendations, naming and implementation is up to you anyway. I'd be happy about this feature since it would allow me to completely ditch nuget.exe on FAKE-enabled repos.
(Thanks @bartelink for pointing out the two exclusive options)
Isn't bare/excludeVersion the Paket default anyway?
Hence paket fetch with no args would seem the most natural way of expressing it ?
paket fetch NuGet.CommandLine ....
I guess this might also address notion of #116
@bartelink Yes, sorry, I should have better expressed that the two options are mutually exclusive.
another option is to use shell multi-line strings to send an inline file and/or have a build.paket.dependencies which has nuget NuGet.CommandLine \n nuget Fake.Core
Getting rid of Nuget.exe is already possible today. Just add "nuget FAKE" to the dependencies file and run paket update and do a paket install in the build.
Paket will never add versions into the path.
I still think a fetch command is needed. It will have to do the following:
- if the version is specified we download exactly that version
- of the lock file contains a requested version we download this
- if we can not find a requested version we download latest
:thumbsup: sounds perfect
Will paket fetch automatically add me an entry into paket.deps if not existent? This would be a nice CLI convenience rather than
- adding it myself to
paket.deps - run
paket update(install)
Would be great!
mhm this would be much more than just fetch.
Just to make sure we are talking about the same thing. Instead of the discussed fetch you want a command x which does:
paket x FAKE
- Add FAKE to deps file
- run paket update (which reresolves and downloads everything)
:thumbsup: Even better !
How about paket add nuget FAKE with the nuget bit being optional. And if the file is not there and/or , generate a template one with some samples and options commented out in a comment
I think this new thing would actually be much easier to implement.
I wonder if this task should ask for all found projects if we want to add to the coresponding paket.references?
--no-projects could skip this
Could we do this the other way around for paket.refs? I mean the following:
paket add nuget FAKE
just adds the entry to paket.deps and downloads FAKE (via paket update. Q: Isn't paket install sufficient enough here?). Nothing else. It's up to the user to decide where and how the package is going to be used. However, if we run
paket add nuget FAKE --interactive
Paket will ask for every project if it should add a ref to it (and the corresponding paket.refs).
Would this fit into the picture?
Yes changing defaults is also ok. I think --interactive (-i) is a good idea.
But I think we should run update in order to reflect the addition in the lockfile. It would also verify that dependencies are OK. Otherwise we could easily introduce conflicts. On Sep 21, 2014 5:33 PM, "ilkerde" [email protected] wrote:
Could we do this the other way around for paket.refs? I mean the following:
paket add nuget FAKE
just adds the entry to paket.deps and downloads FAKE (via paket update. Q: Isn't paket install sufficient enough here?). Nothing else. It's up to the user to decide where and how the package is going to be used. However, if we run
paket add nuget FAKE --interactive
Paket will ask for every project if it should add a ref to it (and the corresponding paket.refs).
Would this fit into the picture?
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket/issues/143#issuecomment-56302352.
I assume the cli with CommardArgParser would look like this:
paket add --nuget FAKE paket add --nuget FAKE --version 3.5 paket add --nuget FAKE --interactive
So we have additional -- before nuget. Ok? On Sep 21, 2014 6:00 PM, "Steffen Forkmann" [email protected] wrote:
Yes changing defaults is also ok. I think --interactive (-i) is a good idea.
But I think we should run update in order to reflect the addition in the lockfile. It would also verify that dependencies are OK. Otherwise we could easily introduce conflicts. On Sep 21, 2014 5:33 PM, "ilkerde" [email protected] wrote:
Could we do this the other way around for paket.refs? I mean the following:
paket add nuget FAKE
just adds the entry to paket.deps and downloads FAKE (via paket update. Q: Isn't paket install sufficient enough here?). Nothing else. It's up to the user to decide where and how the package is going to be used. However, if we run
paket add nuget FAKE --interactive
Paket will ask for every project if it should add a ref to it (and the corresponding paket.refs).
Would this fit into the picture?
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket/issues/143#issuecomment-56302352.
Fine with me. Not the most CLI-friendly line, but very doable.
@eiriktsarpalis do we have other option?
Hmm, depends on what particular alternative you have in mind.
@eiriktsarpalis Can we get UnionArgParser to understand
paket add nuget FAKE
instead of
paket add --nuget=FAKE
? Maybe using an attribute on the nuget argument?
Yep, try using this: http://nessos.github.io/UnionArgParser/reference/nessos-unionargparser-equalsassignmentattribute.html
On Mon, Sep 22, 2014 at 8:10 PM, ilkerde [email protected] wrote:
@eiriktsarpalis https://github.com/eiriktsarpalis Can we get UnionArgParser to understand
paket add nuget FAKE
instead of
paket add --nuget=FAKE
? Maybe using an attribute on the nuget argument?
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket/issues/143#issuecomment-56414830.
Note that this requires parameters to have arity precisely 1.
On Mon, Sep 22, 2014 at 8:27 PM, Eirik George Tsarpalis < [email protected]> wrote:
Yep, try using this: http://nessos.github.io/UnionArgParser/reference/nessos-unionargparser-equalsassignmentattribute.html
On Mon, Sep 22, 2014 at 8:10 PM, ilkerde [email protected] wrote:
@eiriktsarpalis https://github.com/eiriktsarpalis Can we get UnionArgParser to understand
paket add nuget FAKE
instead of
paket add --nuget=FAKE
? Maybe using an attribute on the nuget argument?
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket/issues/143#issuecomment-56414830.