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 restore failing in 5.201.2 #3550

Closed
2sComplement opened this issue Apr 10, 2019 · 45 comments
Closed

paket restore failing in 5.201.2 #3550

2sComplement opened this issue Apr 10, 2019 · 45 comments

Comments

@2sComplement
Copy link

Description

Running paket restore on an existing solution results in an error on 5.201.2:

Resource stream 'Paket.Restore.targets' could not be found in the Paket.Core assembly

Running paket restore on the same project with 5.201.1 works.

Repro steps

Run a paket restore using version 5.201.2 on an existing solution.

Expected behavior

paket restore should run successfully.

Actual behavior

Paket failed with
-> Resource stream 'Paket.Restore.targets' could not be found in the Paket.Core assembly

Known workarounds

Use 5.201.1

@WramblinWreck
Copy link

I'm seeing the same behavior. Any chance this release could be rolled back?

@jfrank-summit
Copy link

Me too.

@sandoichi
Copy link

Same here...causing a lot of issues on our build server that uses the bootstrapper to get the latest.

@mandrepont
Copy link

I agree with @WramblinWreck that this release should be rolled back or a new release should be made with a revert commit. If anyone is using paket in "Magic Mode" it breaks quite mysteriously on the build server. That is not that magic I expected 😢

@baronfel
Copy link
Contributor

This has to do with the names of resources: The name of the resource has changed somehow from the simple version to the fully-qualified version. For example in my work application I had to make a function to prepend the expected namespace of an embedded resource to the 'simple name', like so:

let resourceName simpleName = sprintf "%s.%s" "My.Assembly.Fully.Qualified.Name" simpleName

@BlythMeister
Copy link
Contributor

I made a change recently to always get the targets file...but that has been in a while (since 5.201.0), so don't think that it's that.
Maybe we should make it check simple and fully qualified names.

@SirRippovMaple
Copy link

Does anyone know how to pin the paket.exe version so that we can work around this?

@blair55
Copy link

blair55 commented Apr 10, 2019

@trumpi https://fsprojects.github.io/Paket/dependencies-file.html#Global-options

@BlythMeister
Copy link
Contributor

The "extractElement" function in https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/Installation/RestoreProcess.fs is where this error is coming from.

I'm not near a machine to put logic to handle simple and full resource names if anyone else is able 👍

@baronfel
Copy link
Contributor

@BlythMeister I'm looking right now to prove my assertion above. On .net core I get the following resource names:

resource names: [|"Paket.Restore.targets"; "FSharpSignatureData.Paket.Core";
  "FSharpOptimizationData.Paket.Core"|]

which is what I expect to see (and what the code looks for), but I think on full-framework the behavior might be different. Having a hard time building on mono right now to validate that assertion though.

@jaredreynolds
Copy link

@baronfel Just from past experience, I've always had to use fully-namespaced paths in C# on .NET Framework.

@baronfel
Copy link
Contributor

Now I am confused: I finally got a good build on mono 5.23 and get the following results:

resource names: [|"Paket.Restore.targets"; "FSharpSignatureData.Paket.Core";
  "FSharpOptimizationData.Paket.Core"|]

these are the same as for .net core.

@BlythMeister
Copy link
Contributor

All of this makes sense as to why this mysteriously started happening.
Maybe @forki just needs to rebuild/release

@BlythMeister
Copy link
Contributor

These exe has dropped in size by approx 200kb in this 1 release...I'm not convinced the resources are in there 🙄

@baronfel
Copy link
Contributor

I downloaded the latest release and can confirm the resource is missing:

> let paketAssy = Assembly.LoadFrom(paketPath);;
val paketAssy : Assembly =
  paket, Version=5.201.2.0, Culture=neutral, PublicKeyToken=null

> paketAssy.GetManifestResourceNames();;
val it : string [] =
  [|"FSharpSignatureData.Paket.Core"; "FSharpOptimizationData.Paket.Core";
    "FSCore.resources"; "FSharpSignatureInfo.FSharp.Core";
    "FSharpOptimizationInfo.FSharp.Core"; "FSharpSignatureData.Argu";
    "FSharpOptimizationData.Argu"; "FSharpSignatureData.Chessie";
    "FSharpOptimizationData.Chessie"; "FSharpSignatureData.paket";
    "FSharpOptimizationData.paket"; "ILRepack.List"|]

@BlythMeister
Copy link
Contributor

Mystery solved...but now need someone to re-release...

@forki
Copy link
Member

forki commented Apr 10, 2019

oh my fucking god. something really bad happened after installing VS 2019

I'm trying to revert. and then please retry. But I assume this is unrelated to the changes I made

@BlythMeister
Copy link
Contributor

I don't think it's your changes.

@forki
Copy link
Member

forki commented Apr 10, 2019

ok please retry. and sorry for delay

@BlythMeister
Copy link
Contributor

At a guess...based on exe size still being down a few hundred kB...it might still be broken...not at a machine to test though.

@fangyi-zhou
Copy link

Thanks for the fix, but the problem is still unsolved for me (tested on mac + windows)

@forki
Copy link
Member

forki commented Apr 10, 2019

ok. so VS fucked up my setup. ok. let me try to manually delete the last 2 versions

@forki
Copy link
Member

forki commented Apr 10, 2019

ok I removed the last 2 versions and in theory only 5.201.1 should be restored now.
But I still have no idea how to solve my issue.

@BlythMeister
Copy link
Contributor

People might need to clear the cached downloaded versions...not sure bootstrapper will downgrade paket...

@forki
Copy link
Member

forki commented Apr 10, 2019

ok reinstalling VS 2017. wish me luck

@fangyi-zhou
Copy link

5.201.1 is functional. Thanks!
Removing existing paket.exe correctly allows bootstrapper to download the version that is working

@forki
Copy link
Member

forki commented Apr 10, 2019

@fangyi-zhou any chance you could also test 5.202.0-alpha001 in a couple of minutes? I'm about to push it and if it doesn't work I will delete it again, call it a day and go crying in my bed

@2sComplement
Copy link
Author

Thanks everyone. Here I was all excited to install VS2019.... guess that won't be happening any time soon.

@fangyi-zhou
Copy link

@forki Sure. Let me know when you push the tag

@forki
Copy link
Member

forki commented Apr 10, 2019

Tbf the issue is probably more that I uninstalled VS 2017 and that we seem to depend on something in that, which is not found automatically in VS 2019.

@forki
Copy link
Member

forki commented Apr 10, 2019

@fangyi-zhou ok the alpha version is released. please let me know

@xavierzwirtz
Copy link
Contributor

xavierzwirtz commented Apr 10, 2019

5.202.0-alpha001 works for me, on windows 10.

@fangyi-zhou
Copy link

Works for me

@forki
Copy link
Member

forki commented Apr 10, 2019

thanks!!!!!

ok pushing this one as proper 5.202.0.

Sorry everyone. Now I need to find out what VS2017 makes special

@forki forki closed this as completed Apr 10, 2019
@forki
Copy link
Member

forki commented Apr 10, 2019

ok 5.202.0 emergency release is out. Thanks everyone for helping and testing.
I now need to reevaluate some of the deplyoment ideas and maybe join @matthid's strategy how he releases FAKE.

@matthid
Copy link
Member

matthid commented Apr 10, 2019

You could always start a FAKE release after paket and revert paket changes if that fails ;)
(just in case people think I'm serious:) That obviously wouldn't work as people are complaining long before FAKE release process catches the problem ;)

I can only say it slows down the release process but increases the quality bar. And it's a bit of work to set it up...

@forki
Copy link
Member

forki commented Apr 10, 2019 via email

@BlythMeister
Copy link
Contributor

I've got a PR open in fake to make version 4 support vs2019

@forki
Copy link
Member

forki commented Apr 11, 2019

Link?

@BlythMeister
Copy link
Contributor

Oh, you merged it already...fsprojects/FAKE#2277

@forki
Copy link
Member

forki commented Apr 11, 2019 via email

@BlythMeister
Copy link
Contributor

Or as a fallback, just install the build tools for 2017 not full blown vs.
On my Dev setup I have vs2019 and build tools for 2015 and 2017 👍

@forki
Copy link
Member

forki commented Apr 11, 2019

I released 5.203.0-alpha001 with updated FAKE and without VS2017 on my machine.
Can someone please confirm that it works?

@fangyi-zhou
Copy link

works for me

@forki
Copy link
Member

forki commented Apr 11, 2019

thanks. so it looks like evrything is back to normal

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