-
Notifications
You must be signed in to change notification settings - Fork 300
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 .NET 7 for Fable 3? #3294
Comments
Fable 3 is currently not working with .NET SDK 7 (fable-compiler/Fable#3294) Update README to not forget `dotnet tool install`
Workaround: Create a {
"sdk": {
"version": "6.0.0",
"rollForward": "latestMinor"
}
} This will tell dotnet to use .NET 6 for the current directory and children. The other solution is to move to Fable 4 (in beta stage at the time of writing). |
Maybe another approach is update the template with this approach and also, adding the Fable 4 templates? |
@AlbertoLeon The template has been updated to include a Make sure you deleted all temporary artefacts like |
I think not having support of .NET 7 or an error report in Fable 3 is hurting Fable. This is because new users and even old users are hitting a wall and they don't know what is happening. This can lead to frustration and less adoption of Fable. Are the changes required to support .NET 7 in Fable 3 complex? Would checking |
I second @MangelMaxime's proposal. This failure can be quite frustrating because the error message doesn't give a clue about possible cause of failure except that it looks like nothing works. With growing .NET 7 adoption it's quite important to enhance Fable 3 with support for it. |
Readme suggests and looking at the page .NET 7.0 and
I also wish Fable4 become the production-ready release with the official templates soon. |
I think this issue should be pinned above all issues until it's solved. |
VS 2022 requires .NET 7 for most of its workloads. So now all my existing Fable projects are broken. Why is a global.json file required to fix this? The project already has net6.0 as the SDK version in the project file. AFAIK, this is what VS uses to compile to net6.0 even tho |
The This is because something changed in .NET 7 in how dependencies resolution should be done (like with every release of .NET I think...) If you use the |
Point is: Simply having .NET 7 installed -- which is now a prerequisite for most VS 2022 workloads -- breaks all Fable 3 projects. It is very disconcerting when a project suddenly and inexplicably stops working. Adding a global.json is a work-around, but only after half a day of trying to figure it out, confidence destroyed. |
It could if dependencies resolution is fixed when running with .NET 7. You can install several version of dotnet side by side, so you can have both .NET 6 and .NET 7 installed at the same time.
Indeed, this bug is annoying. In general, it is a good idea to lock your runtimes in the same way you do it for your dependancies. This help makes the code reproducible between machines and easier to spot why something is breaking. |
I do have both SDK versions installed. (Even if I didn't, later SDK versions will typically compile to older targets.) But the correct target is specified in the .fsproj file. The dotnet build tool has the update: Just adding global.json file without having NET 6 SDK installed, project won't build. Have to manually install .NET 6 SDK too. Or downgrade to VS 17.3 (17.2 is LTS) to avoid all of this. NET 7 was added in 17.4. |
For what it's worth, this story gets a bit more complex on linux - or at least it was weird for me on Ubuntu. I had the I'm adding this anecdote for 2 reasons:
For anyone stumbling across this issue and having similar symptoms, I had to manually extract the dotnet 6 binaries & copy the content of |
How is this issue prioritized? |
We don't have a blog post announcement yet, but today Fable 4 has been released with JavaScript considered stable. The idea is that the maintainers want to avoid spending time fixing issues in Fable 3, and encourage people to move to Fable 4 in order to get the latest features ans support for .NET 7 is part of it. |
This break occurs from a supposedly backward compatible tool update and the cause is hard to discover. (Google didn't find it... a kind soul on F# slack directed me here.) Is there no way to address this economically? Asking everyone to upgrade to a newly released major version is pretty intense. |
I would love to have it supported in Fable 3 or at least have an explicit error message. However, the main maintainers of Fable are focused on Fable 4 now. I tried to port the changes from Fable 4 to Fable 3 but encounter errors that I don't understand. My PR his here: #3363 I think if someone is able to make my PR work or submit another PR that works or improve the situation we could have it accepted. Contributions are always welcomed |
Description
I see more and more people reporting issues with their dependencies not being found.
The cause of the error is that Fable 3 doesn't support .NET 7 but because the error is not obvious they can't figure it out.
Would it be possible to post the changes made for Fable 4 to Fable 3? If not is it possible to detect the error and indicate to the user to add a
global.json
to their project to lock to .NET 6?Option 1 would be better if doable :)
The text was updated successfully, but these errors were encountered: