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

Support R versions 3.5+ via R.NET 1.8.2 #205

Closed
wants to merge 6 commits into from

Conversation

jmp75
Copy link
Contributor

@jmp75 jmp75 commented May 26, 2019

  • R.NET 1.8.2 supports all 3.X versions of R on Windows, and 3.5+ on *nix.
  • Update the dependencies in paket.dependencies to pin nuget packages to those currently available.
  • the RProvider .fsproj project files needed to be upgraded to target .NET framework 4.7.2 due to what paket does to include dependencies in project files.

@dsyme
Copy link
Member

dsyme commented Nov 20, 2020

@jmp75 Would you like to be a maintainer on this project?

@jmp75
Copy link
Contributor Author

jmp75 commented Nov 27, 2020

@dsyme I can be if this helps. I am limited in the amount of time I can dedicate due to professional and personal reasons but happy to help when I can.

@cgravill
Copy link

I couldn't get this to build so I had a go at extending your change @jmp75 modernising the build infrastructure, with partial success, on here:
https://github.com/cgravill/RProvider/tree/devel/rdotnet_netstandard2.0

It's building a .NET SDK style project, with dotnet Paket etc. However, it's not working as an actual TypeProvider when I reference it.

FSC : warning FS3005: Referenced assembly 'XYZ\forks\RProvider\src\RProvider\bin\Debug\net472\RProvider.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [XYZ\forks\RProvider\tests\Test.RProvider\Test.RProvider.fsproj]
error FS3053 : The type provider 'RProvider.RProvider' reported an error : The type provider constructor has thrown an exception: ReflectionOnly loading is not supported on this platform. [XYZ\forks\RProvider\tests\Test.RProvider\Test.RProvider.fsproj]
    1 Warning(s)
    1 Error(s)

hopefully of some use to someone! My understanding from dotnet/fsharp#3303 is that this shouldn't happen now but perhaps still have something out of date. If I get a chance I'll try digging again.

@nhirschey
Copy link
Contributor

@cgravill, I can confirm type providers (in general) are working. I just finished updating FSharp.Data.Toolbox.*

@cgravill
Copy link

@nhirschey thanks for confirming. Any advice on the process? Do you know if it's a good idea to switch to .NET SDK for build but still .NET Framework with type providers?

I'd like to eventually get this working in .NET Core / .NET Interactive for a demo but was trying to do it incrementally. I haven't done much type provider authoring and would welcome any inputs.

@nhirschey
Copy link
Contributor

@cgravill , I would also like to see this working again.

I know very little about type providers. I mostly had no idea what I was doing when I upgraded FSharp.Data.Toolbox. I just tried to kill intellisense and build errors via google.

I did it incrementally, so I know that a type provider can work with .NET SDK style projects that target .Net Framework type providers (and the Twitter provider still targets net47 because of its Forms usage).

Once you move to the .NET SDK, the type provider files need to be updated to use the new type provider SDK. Most of this for me was in this commit, see the */TypeProvider.fs files here fsprojects/FSharp.Data.Toolbox@64cb3c8. I followed this documentation for syntax references: https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/type-providers/creating-a-type-provider.

If you look at the SAS provider, this pull request was sufficient to go from old style to new style https://github.com/fsprojects/FSharp.Data.Toolbox/pull/54/files. The Sas would build in VS and worked under .net framework and .net core. I just couldn't get the fake build to work. All my commits to the repo after that are fake fixes, documentation fixes, or trying to track down the change in how you need to reference embedded resources in the Twitter provider. If necessary, see this commit for the embedded resource change, which was the most frustrating to track down (fsprojects/FSharp.Data.Toolbox@2db5d39).

@AndrewIOM
Copy link
Collaborator

I'm going to close this PR, as I think it's been superseded by the work that was needed to get RProvider working on .net core. Thanks for all the work on this though!

@AndrewIOM AndrewIOM closed this Nov 12, 2021
@AndrewIOM AndrewIOM added the Status: Abandoned The issue or pull request is no longer relevant due to later changes or circumstances label Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Abandoned The issue or pull request is no longer relevant due to later changes or circumstances
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants