-
Notifications
You must be signed in to change notification settings - Fork 790
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 dependency manager doesn't work out of the box in VS, but it does if compiles with VS #12895
Comments
This is supposed to work. Assuming that the packet package manager is implemented correctly. Which I am sure it is. |
I will take a look when I get a chance. |
Thanks @KevinRansom and hit me up if anything. It would be good to have @KathleenDollard & all think about end user experience (I know the prospect of extensions as powerful as type providers, being like a pandora box, is not the best for restful nights) and some technicals, like some old ideas in #8880. I was thinking having a "open folder to fsharp VS extension" under the F# Interactive settings, with "use at your own risk" (as it requires admin rights for writing in the folder) and note about putting the same extensions under the dotnet sdk. Most VS users will need to drop the extensions manually in two folders, or more, so in long run, it makes it tedious for developers and end users (those that write scripts) to manage the extensions from their IDE, and I'd like to asses what Microsoft wants to happen on that end. Thanks all. |
We should have a design document (e.g. tooling RFC) that specifies how the DependencyManager things work. It's hard to tell what the intended design is. |
@dsyme, it does work the same as the Nuget extension (the .dll of an extension should be next to it), this is the spec for now, and Microsoft shipped "#r "nuget:"" but not what was underlying getting it, or the spec of the RFC, yet, it is clear, extensions work like the one that ships and is supported by Microsoft. I have clarified the RFC: fsharp/fslang-design#659 I am eager the whole thing evolve, to something as great as installing vscode extensions in major IDEs, and ideally, that there is a stable location, and documented behaviour about how the loading of extension takes place, but it will be hard for me to nudge it, and I am preoccupied about my own ability to use the extensions and to engage with community to write more of them. If this issue is not fixed, no one has much incentive to work on extensions (in F# community, it can take place without need of official documentation being perfect, it works for the compiler for example) IMO. If there are no extensions (beside paket, justifying it is technically true, it is extensible), I doubt Microsoft is going to pour effort in the user experience to install extensions. |
Current status: I am forced to recompile the extension locally with each release/update of VS and there are 3 or 4 locations to put it, to get it to work on all the places it is needed:
IMO, it makes extension in scripting context unusable. I assume it is a missing handling for FSharp.Core binding redirect through https://docs.microsoft.com/en-US/dotnet/api/system.appdomain.assemblyresolve?view=net-6.0 that would make it work in VS. |
@dsyme, questioning the "impact: low", it is like there is not much interest in seeing the extension mechanism being put into use, or that |
@smoothdeveloper I'll let @KevinRansom decide on the priority and direction here. It's true I'm now a more skeptical of the long-term viability or wisdom of supporting an extensible model of resolution - especially anything that involves globally installed tools or tools not managed via "dotnet tool" (which wasn't available when we first started this). Also the unexpectedly relatively low activity in the Paket repo in the last year makes me wonder about the scenario now - I mean the tool is maintained and available but the updates to .NET 6 took some time and as a result of the role out of .NET SDK projects it is no longer as influential on the F# community and practice as it was. That's just my 2c worth. The extension point is part of the overall feature set we have and it makes sense to make it work in all reasonable scenarios. And it's quite possible the extension point could itself be extended and come in handy for other things. |
@dsyme, thanks for sharing your standpoint. Regarding paket activity, it is in maintenance mode, but I doubt it goes away, and it is widely used, even with dotnet SDK (and PackageReference), it still provide functionality and aspects that aren't doable without it, and are simpler than what Microsoft is designing with nuget. For example, I just noticed fantomas repository uses it to avoid taking binary dependency on FCS (quite clever, to shorten feedback loop, etc.), I can't myself work much without it in projects involving lots of dependencies, etc. Also the breadth of contributors that open issues and fix them themselves or get a quick fix by seasoned maintainers is good testimony of durability of the tool. The paket extension itself is super useful, and I can see other useful extension in the making, that would really bring value to F# scripting, only the deployment story is less than ideal (#8880 has few pointers, and we could discuss). #r "roslyn: path.to.vb"
#r "msbuild: path/to/file.proj"
#r "cppsharp: path/to/include.hpp" The paket extension does stuff that nuget can't do (file dependencies, git/github dependencies, etc.). Proposed action plan:
Extensions could eventually contribute more things to FSI, providing a packaged approach to setup pretty printers, useful for notebooks, etc. But first it is required to make them easy to install. I don't mind it takes a route that involves |
The issue stems from the binary file being "blocked" by the OS. I was able to troubleshot this with debugger and seeing the inner exceptions messages. Would the fsharp team take a PR that:
? Also, I'd like that either the compilertool parameter given to FSI becomes used by the compiler service so end users could install the assemblies where they want and adjust a single setting for both FSI and the tooling, while currently, they need to deploy the assembly at two spots (one for the fsi binary, one for VS), will the team consider such change? |
@baronfel, do you know if an API exists in the various .NET runtimes (the ones for Visual Studio, I'd like FSI and the tooling to report the specific error and provide guidance to the user when Windows defender / internet browser blocks a downloaded extension. |
When I pull the release of FSharp.DependencyManager.Paket.dll from https://github.com/fsprojects/Paket/releases and drop it next to the location it is required under
dotnet fsi
(under the dotnet sdk folder, next to the nuget extension), it just works.However, when I attempt to do so, in order for VS to pick it up, dropping under the commonextensions/microsoft/fsharp folder, VS doesn't pick it up.
Repro steps
#r "paket: nuget Foo"
in itExpected behavior
Typechecks or complains about the file being locked by the OS, and guide the user to fix it.
Actual behavior
Complains about the extension "paket" not being present.
Actual manual fix
check that the extension assembly file is not blocked by the OS (due to being downloaded from browser or other reasons).
Initial workaround
FSharp.DependencyManager.Paket.release.zip
Related information
It always behaved this way, it is not something which broke due to a change, but it should be fixed if possible.
I suspect it impacts any other extensions than the one which Microsoft ships, I don't know why it works out of the box in the dotnet sdk but not in VS.
The text was updated successfully, but these errors were encountered: