fsprojects / IfSharp

F# for Jupyter Notebooks
Other
441 stars 71 forks source link

Update to Paket 4.x #140

Closed cgravill closed 7 years ago

cgravill commented 7 years ago

Now that Paket 4.x is stable we can switch #130

We can configure the script generation from the Paket depenency itself now - https://fsprojects.github.io/Paket/paket-generate-load-scripts.html#Generating-load-scripts-for-all-NuGet-packages

I've done some testing and it's mostly good, but there is a snag, the api for generateScriptsForRootFolderhas changed

Paket.Dependencies.Install """
frameworks: net45
source https://nuget.org/api/v2
nuget MathNet.Numerics
nuget MathNet.Numerics.FSharp
nuget FSharp.Data
nuget XPlot.Plotly
nuget Angara.Base
"""

Paket.LoadingScripts.ScriptGeneration.generateScriptsForRootFolder 
   Paket.LoadingScripts.ScriptGeneration.FSharp
   (Paket.FrameworkIdentifier.DotNetFramework Paket.FrameworkVersion.V4_5)
   (System.IO.DirectoryInfo __SOURCE_DIRECTORY__)

The current Azure Notebooks encourages users to do that: image

If people use the higher level form @sylvanc developed it works fine

#load "Paket.fsx"
Paket.Package
  [ "MathNet.Numerics"
    "MathNet.Numerics.FSharp"
  ]
#load "Paket.Generated.Refs.fsx"
cgravill commented 7 years ago

OK, I'm going to go ahead and merge this to master as it's overlapping with other updates to F# Compiler Service and F#. The external examples should be updated before this is put live.