ionide / ionide-vscode-paket

VS Code plugin for Paket
http://ionide.io
MIT License
39 stars 29 forks source link

Automated dotnet restore after install? #68

Closed isaacabraham closed 5 years ago

isaacabraham commented 5 years ago

After you run a paket install, you still need to manually run a dotnet restore / build to get the newly installed packages to show up. Might it be worth having an automatic dotnet restore run after the install process?

forki commented 5 years ago

Some however I think this is a paket bug. @matthid in theory it should not be needed, right?

Am Fr., 7. Dez. 2018, 13:02 hat Isaac Abraham notifications@github.com geschrieben:

After you run a paket install, you still need to manually run a dotnet restore / build to get the newly installed packages to show up. Might it be worth having an automatic dotnet restore run after the install process?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ionide/ionide-vscode-paket/issues/68, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNGPEezrQaPtuw0Sdxi8sd4B-hRrbks5u2ljagaJpZM4ZIUf6 .

matthid commented 5 years ago

I have no idea but maybe nuget creates some cache stuff in the obj directory which the tooling picks up?

Krzysztof-Cieslak commented 5 years ago

Haven't we been watching in FSAC for some stuff that Paket should delete/change on install, which should start new project parsing, which should result in "project not restored" response, which should start dotnet restore in Ionide automatically?

Damn, this workflow....

isaacabraham commented 5 years ago

OK - here's a repro repo: https://github.com/isaacabraham/paket-no-restore

  1. Clone the repo.
  2. Run paket install. This will bring down Newtonsoft as well as FSharp.Core.
  3. Try to e.g. open Newtonsoft.Json in Program.fs. Nothing happens.
  4. Explicitly add Newtonsoft.Json to paket.references.
  5. Run paket install. This will bring down nothing but modify the project file to reflect the ref.
  6. Try to e.g. open Newtonsoft.Json in Program.fs. Nothing happens.
  7. Run dotnet restore
  8. Try to e.g. open Newtonsoft.Json in Program.fs. Intellisense is now provided.
isaacabraham commented 5 years ago

cc: @forki

forki commented 5 years ago

weLoveSpurs.fsproj - no wonder it doesn't work

forki commented 5 years ago

ok one reason is: Newtonsoft.Json is not in references

isaacabraham commented 5 years ago

@forki That's the point. Sorry I didn't explain well - let me update the steps.

forki commented 5 years ago

ah ok. updated steps make sense and I consider it a bug in paket.

isaacabraham commented 5 years ago

@forki should I raise an issue in paket main repo and link to this or?

forki commented 5 years ago

@isaacabraham no need. see https://github.com/fsprojects/Paket/pull/3503

isaacabraham commented 5 years ago

This will definitely have a positive impact. I'm amazed people haven't noticed this before - for beginners to paket + dotnet core it must be very confusing.

forki commented 5 years ago

please retry with latest paket. and thanks for the repro.

isaacabraham commented 5 years ago

Confirmed fix in 5.197.0 :-) The only "small" change would be for Ionide to refresh itself without you needing to start typing, but this is a very nice-to-have.

isaacabraham commented 5 years ago

I take it back. That does actually work!

forki commented 5 years ago

Yes it works because paket now nukes the assets file again. And ionide has a filewatcher on it...

Am Mo., 18. Feb. 2019, 17:58 hat Isaac Abraham notifications@github.com geschrieben:

I take it back. That does actually work!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ionide/ionide-vscode-paket/issues/68#issuecomment-464809756, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNJbqyAvI2oWaI0ojNIQbLvXok_-0ks5vOtujgaJpZM4ZIUf6 .