Skip to content
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

Paket pack: need a way to specify current nuget version as dependency #837

Closed
eiriktsarpalis opened this issue May 22, 2015 · 10 comments
Closed

Comments

@eiriktsarpalis
Copy link
Member

I'm interested in integrating the paket pack functionality in my projects, so I've started playing around with it in FsPickler. In FsPickler there are two projects, FsPickler and FsPickler.Json. FsPickler has no nuget dependencies and FsPickler.Json depends on 1) Json.Net and 2) FsPickler of precisely the same version number.

I can rely on the Json.Net dependency being added automatically by paket pack, however I can't find a way to specify the latter dependency correctly. Is there any way I can achieve this through the paket.template syntax or FAKE?

@forki
Copy link
Member

forki commented May 22, 2015

Mhm good question. @mavnn do you have a suggestion how we could implement such a feature?

@forki
Copy link
Member

forki commented May 23, 2015

@eiriktsarpalis how would you like to configure this feature. I think I can add it easily, but we need to define where and how.

@eiriktsarpalis
Copy link
Member Author

I could think if two possible ways: either use a macro in the template
syntax for the current version or have FAKE pass additional dependencies to
the pack configuration record.
On Sat, 23 May 2015 at 10:39 Steffen Forkmann [email protected]
wrote:

@eiriktsarpalis https://github.com/eiriktsarpalis how would you like to
configure this feature. I think I can add it easily, but we need to define
where and how.


Reply to this email directly or view it on GitHub
#837 (comment).

@forki
Copy link
Member

forki commented May 23, 2015

I think it should be done in the template.

@eiriktsarpalis
Copy link
Member Author

I tend to agree, it would make package definitions more self contained.
On Sat, May 23, 2015 at 11:15 Steffen Forkmann [email protected]
wrote:

I think it should be done in the template.


Reply to this email directly or view it on GitHub
#837 (comment).

@forki
Copy link
Member

forki commented May 29, 2015

do you already started the conversion? I'd love to use it as a sample to implement this.

@eiriktsarpalis
Copy link
Member Author

Yeah, I started an effort in this branch, though I never completed it.

@forki forki closed this as completed in 664cb70 May 31, 2015
@eiriktsarpalis
Copy link
Member Author

I'm getting the following error while trying to pack that FsPickler branch with 1.9.0:

eirik@FELIXPC ~/Development/nessos/FsPickler (paket-pack)
$ .paket/paket.exe pack output bin
Paket version 1.9.0.0

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Paket.TemplateFileModule.f@1-85(FSharpOption`1 currentVersion, String d)
   at [email protected](String[] array)
   at Paket.TemplateFileModule.getDependencies(FSharpMap`2 map, FSharpOption`1 currentVersion)
   at Paket.TemplateFileModule.getOptionalInfo(FSharpMap`2 map, FSharpOption`1 currentVersion)
   at [email protected](PackageConfigType _arg3)
   at Chessie.ErrorHandling.Trial.fSuccess@63-11[p,r,q](FSharpFunc`2 f, p x, FSharpList`1 msgs)
   at Chessie.ErrorHandling.Trial.fSuccess@63-11[p,r,q](FSharpFunc`2 f, p x, FSharpList`1 msgs)
   at Chessie.ErrorHandling.Trial.TrialBuilder.Using[d,e](d d, FSharpFunc`2 body)
   at Paket.TemplateFileModule.Load(String fileName, FSharpOption`1 currentVersion)
   at [email protected](ProjectFile projectFile)
   at Microsoft.FSharp.Collections.ArrayModule.Choose[T,TResult](FSharpFunc`2 chooser, T[] array)
   at Paket.PackageProcess.Pack(DependenciesFile dependencies, String packageOutputPath, FSharpOption`1 buildConfig, FSharpOption`1 version, FSharpOption`1 releaseNotes, FSharpOption`1 templateFile)
   at [email protected](ArgParseResults`1 results)
   at Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   at [email protected](Command command, String[] args)
   at <StartupCode$paket>.$Paket.Program.main@()

@forki
Copy link
Member

forki commented Jun 1, 2015

thx. I found this bug and fixed it in 1.9.1.
it now works on my machine, but only after I renamed your "Paket.template" files to "paket.template" (all lowercase)

@eiriktsarpalis
Copy link
Member Author

Thanks, seems to be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants