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

Fornax.Core dll not reference-able using '#r "nuget:Fornax" #70

Closed
jbeeko opened this issue May 25, 2020 · 6 comments
Closed

Fornax.Core dll not reference-able using '#r "nuget:Fornax" #70

jbeeko opened this issue May 25, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@jbeeko
Copy link
Contributor

jbeeko commented May 25, 2020

Describe the bug
#r "nuget:Fornax" will download the package to the .nuget cache but the dll can't be found. This means in the F# 5.0 world it will not be possible to write loaders, etc with just nuget refs.

To Reproduce
Open the below as a .fsx file in Ionide on a system with .NET 5.0 installed. Note SiteContents is not not visible to compiler. Uncomment the direct reference and it becomes visible. I believe this is because the Fornax.Core.dll is in a non-standard location.

#r "nuget: Fornax"
//#r "/Users/joergbeekmann/.nuget/packages/fornax/0.13.1/tools/netcoreapp3.1/any/Fornax.Core.dll"

let x: SiteContents option = None

Expected behaviour
SiteContents should be resolved like it is if the direct reference is in place.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: MacOS
  • Ionide version: 4.11.1
  • VSCode version: latest
  • dotnet SDK version: 5.0
  • mono / .Net Framework version: N/A
@Krzysztof-Cieslak
Copy link
Member

I think the issue is we don't use --langversion:preview in FSI session hosted in Fornax - https://github.com/ionide/Fornax/blob/master/src/Fornax/Generator.fs#L31

@Krzysztof-Cieslak Krzysztof-Cieslak added the bug Something isn't working label May 25, 2020
@jbeeko
Copy link
Contributor Author

jbeeko commented May 25, 2020

@Krzysztof-Cieslak I don't think that is the issue because on my system with with F# 5.0 the compiler service can't resolve those references. But I'll find out if they can be referenced in a standard project in which case the bug is on the FSharp compiler side.

@Krzysztof-Cieslak
Copy link
Member

Oh, it may be caused by the fact Fornax is packed as a tool and referencing tool is probably not supported scenario. In such a case, we will need to release Fornax.Core as normal NuGet package.

CC: @cartermp could you confirm this suspicion?

@cartermp
Copy link

Yeah, you can't reference a global tool like a normal nuget package:
image

So you'd need to release some kind of core library for folks to use if they want to do it that way.

@MangelMaxime
Copy link
Contributor

Is it be possible to release Fornax.Core as a NuGet package?

In my project I am using paket to manage the dependencies thanks to its generate_load_scripts features. And Fornax.Core is the only dll I cannot manage this way.

Note: I am using paket instead of #r "nuget: ..." because #r is really slow to resolve. For me it adds 4 sec per fsx file where it is present. Because paket install the dlls locally it doesn't "really" had a overhead each time the file is being process.

@TheAngryByrd
Copy link
Member

TheAngryByrd commented Mar 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants