Comments (6)
I suspect this is because Fable 4.8 had a bump in the FCS version used internally.
That FCS bump also caused #3658
@ncave Should we try to use a version of FCS which match with the current released version of it?
from fable.
This short syntax doesn't actually compile on .NET 6.0
, and is incorrect according to the F# documentation, where member
in static member
is not optional (cause you can also have static let
, static do
, static val
).
(Although, confusingly, it is unclear why omitting member
is allowed for abstract
, perhaps cause it's unambiguously always a member?).
Looks like there was a regression that allowed it to compile on .NET 7.0
and .NET 8.0
, which was recently fixed.
We could revert this fix for Fable until it shows up in an officially released version of F# (other than .NET 6.0
), but it will eventually make it in, as it is already merged in dotnet/fsharp
.
from fable.
Thank you for the detailed explanation.
This is a tricky decision, I think we should wait to see what the F# team answer to your comment on their issue. And follow their decision.
from fable.
IMO, we shouldn't modify the compiler or language, if not through a suggestion for such important syntax adjustment.
I feel the argument for making member
optional with static
has some ground, despite I'm not in favor of it, but then it should be a normal suggestion.
The code which is wrong for all version of F# but version 7 (because nobody reported the issue before) can probably be adjusted with less efforts, despite it is unwelcome surprise, or "breaking".
At least, I'll not let guilt come in my vicinity for having reported the issue, while having compassion for those that liked the member
being optional and those that need to adjust code 🙂.
Adjusting the release notes of Fable mentioning that for now, the adjustment is necessary, and pointers to the issue for tracking the status seems to be the best action to take now, so people won't complain of breaking change that isn't described in the release notes.
from fable.
we shouldn't modify the F# compiler or language
Absolutely, but given that the problem is already there in both latest released .NET 7.0 and .NET 8.0, it could be a valid option to rollback the fix temporarily in Fable until it is officially released upstream.
But I agree with all your points, we could also update the Fable release notes to mention it.
from fable.
The code which is wrong for all version of F# but version 7 (because nobody reported the issue before) can probably be adjusted with less efforts, despite it is unwelcome surprise, or "breaking".
I believe version 8 is also impacted.
But yes, I agree that the "correct code" right now, is to use static member
as this is what is described in the F# language / RFC etc.
from fable.
Related Issues (20)
- Import followed by a comments should be moved to the top of the generated file HOT 5
- Local Function Name Clashes with Global JavaScript Functions Leading to Incorrect Behavior HOT 1
- `--test:MSBuildCracker` not working against Glutinum project HOT 4
- Bug in DateTime: 03/2024 has 30 days instead of 31 HOT 2
- [Python] Custom hash functions are never called on Record Types.
- Object expression should not inline variable in getter in `Release` mode HOT 4
- Latest Fable compiler v4.14.0 breaks the getTodos API call in the latest SAFE stack template v5.04 HOT 2
- Fable tool install size HOT 2
- [Python] System.DateTime.ToString(formatstring) unable to parse "dd" HOT 3
- [Python] String index access isn't changed to zero-based in the generated python code HOT 2
- `dotnet fable watch` stops working with `--run npx vite` HOT 2
- unit function is called before passing as argument of JavaScript function HOT 5
- fable-compiler-js `package.json` dependencies are broken
- Better support for fable-compiler-js HOT 17
- Typo in case rules docs? HOT 1
- Production build optimization sometimes break React hooks rules HOT 4
- [Fable-Python] import statement falsely changed to snake_case. HOT 5
- Accessing a ResizeArray out of bounds, should generate an exception, like on .NET HOT 1
- Compilation fails on an FsCheck based project HOT 2
- TimeSpan gets poisoned when created from high-precision TimeSpan.FromMilliseconds(float) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fable.