Closed pchalamet closed 3 years ago
Are you sure that you need 3.1 sdk, I guess that It is should be enough to have 3.1 runtime (latest LTS)
Yes probably. It's a copy/paste from my build... Here is the min workaround:
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 3.0 --runtime --install-dir /usr/share/dotnet
Looking at runtime manifest of lex and yacc, I guess whichever 3.x runtime works as a workaround.
I've investigated a little bit this issue. Latest version on Nuget is 10.0.0 which is compiled for .net core 3.0 - unfortunately, this can't run on .net 5.0 (looks like no runtime upgrade to latest major version unlike .net core 3.1).
It looks like source code in master is not published on Nuget, RELEASE_NOTES tells about version 10.1.0 which apparently has not been released on Nuget. Support for .netcoreapp3.1 has been added by @cartermp on commit 153fd910019abf2cc2f848d89f24869cb32664cc.
I've just tested the generated nupkg on master and everything seems to work with my app and tests (using only .net sdk 5.0 to build my apps).
@cartermp @sergey-tihon @dsyme @kkm000, is there something blocking the release of a new Nuget based on master ?
Thanks!
@pchalamet I've released v10.1.0 from latest master source code, compiled for .net core 3.1.
Please try once again, but as far as I see it does not work on win and linux properly. For some magical reason it only works on macOS - Logs are here
Sorry Sergey, I played yesterday with target frameworks net50 and roll forward and just mess up with my tests. It does not work as is obviously, as no upgrade policy is specified. It does work with roll forward enabled.
So, easiest path to support net50 is to enable RollForward (see PR #137) on projects.
Probably worth a new nuget then š
Everything compiles (and works fine) with 10.2.0-beta1 from Nuget and only .net5.0 ! š Thanks Sergey!
<ItemGroup>
- <PackageReference Include="FsLexYacc" Version="10.0.0" />
+ <PackageReference Include="FsLexYacc" Version="10.2.0-beta1" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
</ItemGroup>
> dotnet --list-runtimes
Microsoft.AspNetCore.App 5.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
> dotnet --list-sdks
5.0.100 [/usr/local/share/dotnet/sdk]
Thank you @pchalamet for the fix!
Description
Building a project (using nuget FsLexYacc 10.0.0) targeting .net 5.0 and with only .net sdk 5.0 installed is not possible. Here is a log from a build:
Looks like tools are configured to run under .net 3 only.
Repro steps
Remove previously installed .net sdk and only install .net 5.0:
Convert a project to net5.0 (
<TargetFramework>net5.0</TargetFramework>
). Build it ==> it fails.Expected behavior
FsLex and FsYacc should still work under .net 5.0.
Actual behavior
It does not work under .net 5.0.
Known workarounds
Install runtime 3.x, but it's really ugly:
Related information
Tested on macOS, .net5.0 only, using FsLexYacc 10.0.0