Closed ncave closed 4 days ago
@MangelMaxime This is just a first pass. We may want to update the Fable CLI to .NET 8.0, now that .NET 6.0 is no longer supported. There are quite a few security warning for old dependencies that need to be updated.
Before we merge this, do you mind publishing a new Fable release with all the pending changes that have already been merged?
Here is perhaps why the Analyzers build fails: https://github.com/dotnet/sdk/issues/44868 We may have to disable it until it's resolved.
Update: Switching the analyzers build to Linux makes it work.
Hello @ncave,
I made a new Fable release with all the changes available on main
.
However, to do the release I had to revert Run husky with --allow-roll-forward because I had an error telling me that --allow-roll-forward
is not a recognised argument.
I didn't investigate any further as I wanted to make the release and we can re-introduce --allow-roll-forward
if needed.
@MangelMaxime
I had to revert https://github.com/fable-compiler/Fable/pull/3956
That's fine, we can add it later. Just need to figure out how to conditionally add it only for .NET 9.0.
@MangelMaxime Rebased, ready for review.
Let me know if you think we need to bump the Fable CLI major version for this change in TFM.
@ncave Thank you, I will have a look at it tomorrow.
I think this is ready to be merge but we need to make a decision regarding the version number indeed.
I believe we should probably bump the major version because people requesting .NET 6 using global.json
will not be able to use Fable 5. At least, that's what I would expect dotnet/NuGet to do.
If we do the bump, here are the "side effects" we should resolve (perhaps there are some others too):
Can this cause issues with Fable compiler plugins?
In theory, this should be fine because Compiler plugins should have defined something like override _.FableMinimumVersion = "4.0"
There are probably only 2 plugin really impact by that Feliz which should be ok and Oxpecker.Solid which should also be fine.
What about Fable.AST ?
I think I remember a discussion where we mentioned that Fable AST version was mirroring Fable version. So Fable AST 4.x was for Fable 4.
Should we also bump Fable.AST to version 5 or says that Fable.AST 4 is compatible with Fable 4 & 5?
I think the easier path is to consider Fable.AST 4 compatible with Fable 4 & 5. We can even make a matrix in Fable documentation to make an official statement.
If we bump to .NET 8, it means we are now in a situation where we can make MSBuildCrackerResolver
the default instead of BuildalyzerCrackerResolver
.
If we do the major bump, I think this a good opportunity to do the switch and add a --legacy-resolver
options to Fable CLI as a potential workaround if something was not catch during the experimentation phase of MSBuildCrackerResolver
.
We need to archive current Fable REPL under /repl4
and make the /repl
target Fable 5.
We need to create FABLE_COMPILER_5
compiler directive. There is a risk that some libraries will need to be updated if they used #if FABLE_COMPILER_4
but I expect this impact to be minimal.
I checked SAFE Stack template and they are already using .NET 8 via global.json
. So at least, here we should avoid too much migration path issues if we bump to a .NET 8 tool.
With all that said I see 2 solutions:
@MangelMaxime All good points, I fully agree (especially # 3, I was going to say the same exact thing). IMO, let's just go with it, the nullability change in F# 9 is reason enough to bump major version in Fable too.
My two cents: go with a major and publish alpha's until you get it right.
You are right @nojaf better be safe than sorry.
@ncave Unless, you started working on the different items I listed, I can work on them and if all goes well make an alpha version to check it on a "real project".
@MangelMaxime Please go ahead. IMO # 4 (the repl update) can wait until #3960 is merged.
@ncave Fable 5.0.0-alpha.1 has been released.
I made the main
branch for Fable 5 release and created a fable4
branch if we need to make a release for this version.
I did it in this order because, I don't see Fable 5 to stay in alpha for a long time and like that we can focus on a single version instead of maintaining 2 versions at the same time. If needed, we can always revisit this position.
ubuntu-latest