Giter Site home page Giter Site logo

Comments (6)

MangelMaxime avatar MangelMaxime commented on June 7, 2024

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.

ncave avatar ncave commented on June 7, 2024

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.

MangelMaxime avatar MangelMaxime commented on June 7, 2024

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.

smoothdeveloper avatar smoothdeveloper commented on June 7, 2024

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.

ncave avatar ncave commented on June 7, 2024

@smoothdeveloper

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.

MangelMaxime avatar MangelMaxime commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.