-
Notifications
You must be signed in to change notification settings - Fork 525
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
Losing version-range when 'dotnet pack' #2883
Comments
We can make this work by modifying |
Related:
|
the code in question to be changed should be Paket/src/Paket.Core/PublicAPI.fs Lines 878 to 889 in 1ab743a
|
PRs always welcome
Chet Husk <[email protected]> schrieb am Fr., 24. Apr. 2020, 16:41:
… the code in question to be changed should be
https://github.com/fsprojects/Paket/blob/1ab743a5a928146059842ad7f35cc8501769ff80/src/Paket.Core/PublicAPI.fs#L878-L889,
from what I'm seeing
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2883 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANHCF3QUH5NEKDTSFJTROGQILANCNFSM4ECAG6PA>
.
|
I'm working on it right now, as a matter of fact :) |
Seems like it broke something. While 5.243.0 is working fine 0.244.0 is failing on pack with:
I know this is not very helpful, I'll try to give you better example, but I'm 2 minutes from sprint planning ;-) For now: forcing 5.243.0 fixes problem. |
I reverted it for now.
Am Mo., 27. Apr. 2020 um 12:00 Uhr schrieb Milosz Krajewski <
[email protected]>:
… Seems like it broke something. While 5.243.0 is working fine 0.244.0 is
failing on pack with:
dotnet "pack" "xyz" --configuration Release --output xyz --no-build --no-restore
Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Paket version 5.244.0
Performance:
- Runtime: 702 milliseconds
Paket failed with
-> Could not find version range for package Microsoft.Extensions.DependencyInjection
I know this is not very helpful, I'll try to give you better example, but
I'm 2 minutes from sprint planning ;-)
For now: forcing 5.243.0 fixes problem.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2883 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANB7T4D4PWYJ3Z3J54TROVJSFANCNFSM4ECAG6PA>
.
|
@MiloszKrajewski are you able to give an example project file/paket.references/paket.dependencies/paket.lock? It would be lovely to have as a test case. |
@baronfel I will start working on it now (I need to extract the "essence of the problem" from quite large commercial codebase). |
|
Thank you! I'll dig into this over the next couple days. |
One thing I note is that your
|
@baronfel I didn't notice that, especially wasn't looking for anything like that as many times I saw something like "paket.references mentions X but X is not in paket.dependencies" so I assumed it is checked by paket itself. |
@baronfel after fixing the reference it packs fine. Thank you! It is still a bug in my opinion though as it wasn't found while building (It was referencing assembly which was not in paket.dependencies), but I understand it is outside the scope of this ticket. Is it possible to have more descriptive error message? |
I'm still working on the fix/rewrite of this feature in #3838, but I do intend to emit a warning when we encounter this corner case of 'referenced package is not a direct dependency'. I'm currently printing the message:
but that could very easily be reworded to something like
Do you have any suggestions here as to what would be the most clear? |
I think the problem was a little bit different: I am stupid. I behaved like an idiot and I feel really ashamed about that. (I would still expect this to be warning during build - not only pack, but that's minor) |
Description
Yet again, it might not be paket's problem, but maybe there is something you can do about it.
Guys from 'NLog' team made a mess and rolled back version making making 4.5 newer than 5.0.
My library, let's call it
libA
requires version 4.5 sopaket.dependencies
contains:nuget NLog ~> 4 beta
and it is getting 4.5. So far, so good.
Now, my other project, let's call it appB, which uses
libA
does not know or care about NLog. The only dependency it has islibA
:nuget libA
But... when I do
paket install
it resolvesNLog
version5.0
.Apparently,
dotnet pack
forlibA
puts the restriction>= 4.5
instead of>= 4.5 && < 5
.Long story short, my very precise restrictions about versions are lost when crossing
dotnet pack
boundary.Repro steps
nlfu.zip
Run
setup.cmd
. NoticeNLog 4
is referenced inlibA
(correctly) butappB
referencesNLog 5
(wrongly).Expected behavior
Both
libA
andappB
reference version 4 ofNLog
.Actual behavior
Restrictions are "forgotten", and
appB
references "newest" version of "NLog"Known workarounds
Explicitly put restrictions in appB again (even if assembly is not used directly).
The text was updated successfully, but these errors were encountered: