jonsequitur / dotnet-repl

A polyglot REPL built on .NET Interactive
MIT License
713 stars 35 forks source link

Set roll-forward policy to `LatestMajor` for the global tool. #94

Closed alexrp closed 7 months ago

alexrp commented 7 months ago

On a clean system, installing .NET 8 and then dotnet-repl gets you the following:

You must install or update .NET to run this application.

App: /home/alexrp/.dotnet/tools/dotnet-repl
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: /home/alexrp/.dotnet

The following frameworks were found:
  8.0.1 at [/home/alexrp/.dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=linux-x64&os=ubuntu.23.10

Seems sensible to just set a roll-forward policy like this.

jonsequitur commented 7 months ago

Good call. Thanks @alexrp!

alexrp commented 7 months ago

@jonsequitur any chance I can get you to push a new version with this change included? :eyes:

alexrp commented 6 months ago

I just recently learned that Major may actually be preferable to LatestMajor. It will prefer the runtime the app was built for before rolling forward, rather than always rolling forward.

@jonsequitur do you think it would make sense to change to Major?

I don't know if the runtime that dotnet-repl runs on affects which APIs are available to the REPL environment. If it does, then LatestMajor may still be the right call for dotnet-repl in particular.

jonsequitur commented 6 months ago

I'm not sure there would be much difference between these two.

I don't know if the runtime that dotnet-repl runs on affects which APIs are available to the REPL environment.

This is determined by the SDK version that the core .NET Interactive libraries are built against. Being able to work against multiple SDK versions is on the roadmap but not yet available.