-
Notifications
You must be signed in to change notification settings - Fork 520
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 update problem in sdk style project #3618
Comments
Cc @matthid is that related to "fast restore"?
Sylwester <[email protected]> schrieb am Mo., 22. Juli 2019, 10:32:
… Description
After package update (in paket.dependencies and paket.lock) and restore
packages, old packages are copied to bin dir. Probably they are cached in
obj\project.assets.json.
Repro steps
1.
Create new sdk style project (e.g. net core project) and add packet
Example main function
static void Main(string[] args)
{
var version = FileVersionInfo.GetVersionInfo("Newtonsoft.Json.dll");
Console.WriteLine(version.FileVersion);
Console.WriteLine(JsonConvert.SerializeObject(new
{
version.ProductName,
version.FileVersion,
version.ProductVersion,
},
Formatting.Indented));
Console.ReadKey();
}
2.
Reference package (e.g. Newtonsoft.Json = 12.0.1)
3.
Compile & run program
paket install
dotnet restore
dotnet run# Output# 12.0.1.22727# {# "ProductName": "Json.NET",# "FileVersion": "12.0.1.22727",# "ProductVersion": "12.0.1 509643a8952ce731e0207710c429ad6e67dc43db"# }
To bin folder was copied Newtonsoft.Json.dll in version 12.0.1.22727,
with is correct.
4.
Update package in paket.dependencies (e.g. Newtonsoft.Json = 12.0.2)
5.
Compile & run program
paket install
dotnet restore
dotnet run# Output# 12.0.1.22727# {# "ProductName": "Json.NET",# "FileVersion": "12.0.1.22727",# "ProductVersion": "12.0.1 509643a8952ce731e0207710c429ad6e67dc43db"# }
To bin folder was copied Newtonsoft.Json.dll in version 12.0.1.22727,
with is not correct.
Expected behavior
Packages should be restored with correct version
dotnet run# 12.0.2.23222# {# "ProductName": "Json.NET",# "FileVersion": "12.0.2.23222",# "ProductVersion": "12.0.2 4ab34b0461fb595805d092a46a58f35f66c84d6a"# }
Actual behavior
Packages are restored with old version version
dotnet run# Output# 12.0.1.22727# {# "ProductName": "Json.NET",# "FileVersion": "12.0.1.22727",# "ProductVersion": "12.0.1 509643a8952ce731e0207710c429ad6e67dc43db"# }
Packages probably are cached in obj\project.assets.json and restored in
old version to bin folder. Rebuild/clean project dosent help.
Known workarounds
Delete obj folders in projects.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3618?email_source=notifications&email_token=AAAOANEZWCHPDOT7IVUD2K3QAVWCFA5CNFSM4IFWERBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HASKTTA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAOANFUDNATYKAGRCIJBULQAVWCFANCNFSM4IFWERBA>
.
|
maybe, what 'should' happen is that lockfile gets updated which invalidates the various cache files and the msbuild integration should pick it up if required. |
I think I ran into this problem as well in a SAFE stack application. After upgrading paket.dependencies to bump a library from version 3.1 to 3.2 and running paket install (or doing the same via paket update) the paket.lock file contains the correct new entry but the /src/Client/obj/Client.fsproj.reference file still lists the old library version so Fable restores this old library version and then I wondered why the behaviour did not change. Deleting the obj folder forces a refresh of this file and then everything works as expected. |
@danyx23 any chance for repro? |
ok I think I found the issue. we are nuking he assets file butkeep all Paket files intact. this is a bug |
b13d806 <- waiting for CI |
@forki I have this repo that I was using as the example (https://github.com/danyx23/safe-stack-sweet-alert-debug) that is currently at Elmish.SweetAlert 3.1 and if you build and then upgrade to 3.2 it exhibits the problem. I'll try the new version as soon as it is published - thanks for the fast fix! |
published. please give it a try |
@forki thanks! The bug that I described is fixed in the new version but the delete is too agressive - it deletes the paket.references files in the source directories which then breaks the builds! |
Agree with @danyx23, just saw this happen to me as well. luckily |
Revert is released
Chet Husk <[email protected]> schrieb am Mi., 4. Sep. 2019, 19:04:
… Agree with @danyx23 <https://github.com/danyx23>, just saw this happen to
me as well. luckily git checkout is a thing :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3618?email_source=notifications&email_token=AAAOANHTSIB467CR72WSKWTQH7TCRA5CNFSM4IFWERBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD54IYRA#issuecomment-527993924>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAOANGUGYX7ITFD3UNXTD3QH7TCRANCNFSM4IFWERBA>
.
|
5.218.0-alpha001 should be available in couple of minutes. Can you please
try it?
Am Mi., 4. Sept. 2019 um 19:26 Uhr schrieb Steffen Forkmann <
[email protected]>:
… Revert is released
Chet Husk ***@***.***> schrieb am Mi., 4. Sep. 2019, 19:04:
> Agree with @danyx23 <https://github.com/danyx23>, just saw this happen
> to me as well. luckily git checkout is a thing :)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#3618?email_source=notifications&email_token=AAAOANHTSIB467CR72WSKWTQH7TCRA5CNFSM4IFWERBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD54IYRA#issuecomment-527993924>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAAOANGUGYX7ITFD3UNXTD3QH7TCRANCNFSM4IFWERBA>
> .
>
|
new alpha should be available |
Works like a charm. Thanks a lot for your great work @forki! |
cool so I'm releasing it properly. Thanks for your help with testing |
Description
After package update (in
paket.dependencies
andpaket.lock
) and restore packages, old packages are copied tobin
dir. Probably they are cached inobj\project.assets.json
.Repro steps
Create new sdk style project (e.g. net core project) and add packet
Example main function
Reference package (e.g.
Newtonsoft.Json = 12.0.1
)Compile & run program
To bin folder was copied
Newtonsoft.Json.dll
in version12.0.1.22727
, with is correct.Update package in
paket.dependencies
(e.g.Newtonsoft.Json = 12.0.2
)Compile & run program
To bin folder was copied
Newtonsoft.Json.dll
in version12.0.1.22727
, with is not correct.Expected behavior
Packages should be restored with correct version
Actual behavior
Packages are restored with old version version
Packages probably are cached in
obj\project.assets.json
and restored in old version tobin
folder. Rebuild/clean project dosent help.Known workarounds
Delete
obj
folders in projects.The text was updated successfully, but these errors were encountered: