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

Feature Request: paket.local override nuget package with csproj. #1803

Closed
gertjvr opened this Issue Jul 13, 2016 · 18 comments

Comments

Projects
None yet
4 participants
@gertjvr

gertjvr commented Jul 13, 2016

Description

Feature request, what I am after is the ability to use paket.local file to override a nuget package reference with the csproj file that was used to produce to nuget package.

I have two example repositories ServiceA and ServiceB, ServiceB has a nuget package reference to ServiceA.MessageContract a sub project of ServiceA repository.

Repro steps

  1. Create a paket.local file with content as below
nuget ServiceA.MessageContracts -> project c:\github\ServiceA\src\ServiceA.MessageContracts\ServiceA.MessageContracts.csproj
  1. Run .paket\paket restore

Expected behavior

The nuget reference in ServiceB is replaced with csproj reference of ServiceA.MessageContracts

Known workarounds

The main issue is that our nuget package version number isn't stored in the git repository so have to customise the build script to pass a build number to recreate a nuget package so that paket.local can successfully override them locally.

cc @theimowski

@gertjvr gertjvr changed the title from paket.local override nuget package with csproj. to Feature Request: paket.local override nuget package with csproj. Jul 13, 2016

@gertjvr

This comment has been minimized.

Show comment
Hide comment
@gertjvr

gertjvr Jul 13, 2016

Think #724 is a related issue

gertjvr commented Jul 13, 2016

Think #724 is a related issue

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Jul 13, 2016

Member

This could be interesting however much effort would be required - AFAIK there's currently no utility in Paket to build xprojs

Member

theimowski commented Jul 13, 2016

This could be interesting however much effort would be required - AFAIK there's currently no utility in Paket to build xprojs

@mterwoord

This comment has been minimized.

Show comment
Hide comment
@mterwoord

mterwoord Jul 24, 2016

After a gitter discussion on a wish/question I had, this issue was mentioned. We discussed the following option:

How about giving the option to specify a .dll (/.exe) file in the .local file? Then the only thing paket has to do is replace the hint path in the project file. The difficult paths (finding the outpt filename of the project, taking into account solution settings, etc, etc is then up to the user)

mterwoord commented Jul 24, 2016

After a gitter discussion on a wish/question I had, this issue was mentioned. We discussed the following option:

How about giving the option to specify a .dll (/.exe) file in the .local file? Then the only thing paket has to do is replace the hint path in the project file. The difficult paths (finding the outpt filename of the project, taking into account solution settings, etc, etc is then up to the user)

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Jul 26, 2016

Member

As of now there's a possibility to give path to a nupkg file.
If you had nuget packaging as a part of your referenced project build process, you could use that.

The workflow would then look like this:

  1. for referenced project, specify override in .local file giving a path to where the nupkg is created
  2. make changes in referenced project
  3. build the referenced project, creating a nupkg in result
  4. restore packages in referencing project to consume new changes
  5. if necessary repeat from 2.

You might consider the additional step in build process (creating a nupkg) redundant when the package is really just a single dll, however such solution was the easiest way to incorporate paket.local into existing Paket restore process.

Member

theimowski commented Jul 26, 2016

As of now there's a possibility to give path to a nupkg file.
If you had nuget packaging as a part of your referenced project build process, you could use that.

The workflow would then look like this:

  1. for referenced project, specify override in .local file giving a path to where the nupkg is created
  2. make changes in referenced project
  3. build the referenced project, creating a nupkg in result
  4. restore packages in referencing project to consume new changes
  5. if necessary repeat from 2.

You might consider the additional step in build process (creating a nupkg) redundant when the package is really just a single dll, however such solution was the easiest way to incorporate paket.local into existing Paket restore process.

@gertjvr

This comment has been minimized.

Show comment
Hide comment
@gertjvr

gertjvr Jul 26, 2016

The only issue we have is that the nupkg version number isn't discoverable from the local build process, in our case a locally build version is 0.0.0 and paket restore = local override, fails because it looking the nupkg with the exact reference version number.

gertjvr commented Jul 26, 2016

The only issue we have is that the nupkg version number isn't discoverable from the local build process, in our case a locally build version is 0.0.0 and paket restore = local override, fails because it looking the nupkg with the exact reference version number.

@mterwoord

This comment has been minimized.

Show comment
Hide comment
@mterwoord

mterwoord Jul 26, 2016

One remaining "issue" for me is that if i have to make a nupkg file, i have spent 90% of the time of the build already...

mterwoord commented Jul 26, 2016

One remaining "issue" for me is that if i have to make a nupkg file, i have spent 90% of the time of the build already...

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Aug 1, 2016

Member

@gertjvr what we could do then is to allow for optional version param in the paket.local file, but it'd have to be pinned to specific verison (which should be fine for your case).
@mterwoord You mean the additional time of packaging is an issue?

Member

theimowski commented Aug 1, 2016

@gertjvr what we could do then is to allow for optional version param in the paket.local file, but it'd have to be pinned to specific verison (which should be fine for your case).
@mterwoord You mean the additional time of packaging is an issue?

@mterwoord

This comment has been minimized.

Show comment
Hide comment
@mterwoord

mterwoord Aug 1, 2016

In my situation, I'm building a package using a script, that consumes most of the time. If I still have to build the package every time, I won't be using the paket.local to override, i'd just push them to a server and pull from there

mterwoord commented Aug 1, 2016

In my situation, I'm building a package using a script, that consumes most of the time. If I still have to build the package every time, I won't be using the paket.local to override, i'd just push them to a server and pull from there

@gertjvr

This comment has been minimized.

Show comment
Hide comment
@gertjvr

gertjvr Aug 1, 2016

issue with pinned is paket restore fails to restore with version 0.0.0 if paket.dependencies has a specific version / range.

gertjvr commented Aug 1, 2016

issue with pinned is paket restore fails to restore with version 0.0.0 if paket.dependencies has a specific version / range.

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Aug 1, 2016

Member

I mean pinned version in the local file

Member

theimowski commented Aug 1, 2016

I mean pinned version in the local file

@gertjvr

This comment has been minimized.

Show comment
Hide comment
@gertjvr

gertjvr Aug 1, 2016

sry for my ignorance is that currently implemented?

gertjvr commented Aug 1, 2016

sry for my ignorance is that currently implemented?

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Aug 1, 2016

Member

No not yet. But should be doable with little effort, hence my suggestion

Member

theimowski commented Aug 1, 2016

No not yet. But should be doable with little effort, hence my suggestion

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Aug 1, 2016

Member

I'll give it a go soon and keep you updated

Member

theimowski commented Aug 1, 2016

I'll give it a go soon and keep you updated

@gertjvr

This comment has been minimized.

Show comment
Hide comment
@gertjvr

gertjvr Aug 1, 2016

That would be amazing

On 1 Aug 2016 7:05 PM, "Tomasz Heimowski" notifications@github.com wrote:

I'll give it a go soon and keep you updated


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

gertjvr commented Aug 1, 2016

That would be amazing

On 1 Aug 2016 7:05 PM, "Tomasz Heimowski" notifications@github.com wrote:

I'll give it a go soon and keep you updated


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@theimowski theimowski referenced this issue Aug 2, 2016

Merged

Local file - npkg in path version #1843

1 of 1 task complete
@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Aug 3, 2016

Member

PR submitted - #1843

Member

theimowski commented Aug 3, 2016

PR submitted - #1843

@gertjvr

This comment has been minimized.

Show comment
Hide comment
@gertjvr

gertjvr Aug 3, 2016

Worked!!! 😀 now to blog how to develop microservices locally using this feature

gertjvr commented Aug 3, 2016

Worked!!! 😀 now to blog how to develop microservices locally using this feature

@gertjvr gertjvr closed this Aug 3, 2016

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Aug 3, 2016

Member

Awesome. Post link when you are ready ;-)

Member

forki commented Aug 3, 2016

Awesome. Post link when you are ready ;-)

@theimowski

This comment has been minimized.

Show comment
Hide comment
@theimowski

theimowski Aug 3, 2016

Member

@gertjvr glad it helped! you might have a look at my blog entry on similar topic - I based on "Git override" though

Member

theimowski commented Aug 3, 2016

@gertjvr glad it helped! you might have a look at my blog entry on similar topic - I based on "Git override" though

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