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

[WIP] Impressions from using Paket Pack API #642

Closed
Vidarls opened this issue Feb 23, 2015 · 23 comments
Closed

[WIP] Impressions from using Paket Pack API #642

Vidarls opened this issue Feb 23, 2015 · 23 comments

Comments

@Vidarls
Copy link
Contributor

Vidarls commented Feb 23, 2015

Started working on replacing Fake.Nuget with Paket.Pack

Thought it might be useful to have the first impression from someone working with this API for the first time. So consider this a braindump. If some of this stuff is to be considered a bug, we should probably create separate issues for them.

  • Packing is just a single line of code 😄 (And even for multi output solutions, the complexity does not change as far as I can see it.)
  • Took a bit of time for me to locate the correct API level. I assume the Dependencies.Locate().Pack(...) is the correct one to use for this kind of integration.
  • I had to manually add a reference to the dll of DotNetzip confusingly name Ionic.Zip.dll. In order for Paket to find and load the DLL. Feels a bit wrong to do this as the script itself does not have any direct dependencies on this DLL. Note: I am note very used to writing F# scrips, and it is possible this is to be expected. If so, it should probably be documented somewhere, (Or maybe be part of the file load exception message given?)
  • Even though ProjectScaffold explicitly sets quite a bit of assembly info (https://github.com/fsprojects/ProjectScaffold/blob/master/build.template#L71) None of this seemed to be read by Paket.Pack. Got exception that all mandatory info was lacking, even after checking assemblyinfo.
  • Attempting to set version using the ?version:string parameter to the Pack command did not seem to have any effect.
  • I miss not being able to override all template metadata info from the API. Forcing the use of template files makes project with multiple outputs duplicate a lot of data. (Actually, if we could set all template data from the API, the template file would be pretty much redundant when scripted from an F# environment.
@forki
Copy link
Member

forki commented Feb 23, 2015

did you see that we already have FAKE tasks? https://github.com/fsprojects/Paket/blob/master/build.fsx#L188

@forki
Copy link
Member

forki commented Feb 23, 2015

regarding overwrite of meta-data: that's exactly the pain point we need to figure out. Where would it make sense to add this feature? FAKE tasks or Paket or both?

@Vidarls
Copy link
Contributor Author

Vidarls commented Feb 23, 2015

No I did not 😄

That does seem to solve most issues. Will have a go in the morning.

@mavnn
Copy link
Contributor

mavnn commented Feb 23, 2015

An other option would be to enable paket.template files to share data in some way (I'm thinking off the top of my head here :) ). Some kind of template template that projects within the solution can override.

@JonCanning
Copy link
Contributor

Just been trying it out; fell over when using an indirect dependency PackageMetaData line 209

Turns out it was a dependency I didn't need so I have it working. Will try FAKE tasks now!

@forki
Copy link
Member

forki commented Feb 24, 2015

@JonCanning could you please elaborate? thanks

@JonCanning
Copy link
Contributor

Sorry, you may have noticed that I'm generally crap at reporting bugs

paket.dependencies contains FsPickler.Json, paket.template contains FsPickler

@mavnn
Copy link
Contributor

mavnn commented Feb 24, 2015

It will assume that if you've got a dependency listed in paket.dependencies that you want it listed explicitly as a dependency of your package.

@JonCanning
Copy link
Contributor

I'm trying to push to appveyor nuget and it's failing with a 500 error. I've been trying to fix it but am stumped 😢 Any pointers on what I can do to diagnose the problem?

@forki
Copy link
Member

forki commented Feb 24, 2015

same as #646?

@JonCanning
Copy link
Contributor

It's something with the nupkg, if I pack with nuget I can push with Paket

@mavnn
Copy link
Contributor

mavnn commented Feb 24, 2015

@JonCanning really? Any chance you could get us a copy of the nupkg, or is it closed source code?

@mavnn
Copy link
Contributor

mavnn commented Feb 24, 2015

If you can't send it to us, try opening the nupkg with Nuget Package Explorer and see if that succeeds.

@JonCanning
Copy link
Contributor

Ah, RTFM Jon

In a project file, the following dependencies will be added:

any paket dependency with the range specified in the paket.dependencies file.

I had added a dependency block....

@mavnn
Copy link
Contributor

mavnn commented Feb 25, 2015

@JonCanning did that help? It will just ignore the manually specified dependency block in that case. Also, open question to all: if a project template specifies a files or dependencies section, should that be an error? At the moment they will be silently ignored.

@JonCanning
Copy link
Contributor

Yes, the dependencies are being duplicated

@forki
Copy link
Member

forki commented Feb 26, 2015

can we close this?

@mavnn
Copy link
Contributor

mavnn commented Feb 26, 2015

So, @forki 's issue is fixed in #660 . @JonCanning how are things going with AppVeyor?

@mavnn
Copy link
Contributor

mavnn commented Feb 26, 2015

If it's broken, let's open a new issue for it.

@JonCanning
Copy link
Contributor

It was fine when I removed the dependency block since they were being duplicated

@mavnn
Copy link
Contributor

mavnn commented Feb 26, 2015

@JonCanning thanks!

@JonCanning
Copy link
Contributor

Thanks for this, it has banished nuget completely from our code

@mavnn
Copy link
Contributor

mavnn commented Feb 26, 2015

I feel like I should get this mounted and put on a wall (possibly with a copy for each Paket maintainer)

@forki forki closed this as completed Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants