Skip to content
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

Fable4 #539

Merged
merged 12 commits into from
Jul 6, 2023
Merged

Fable4 #539

merged 12 commits into from
Jul 6, 2023

Conversation

wallymathieu
Copy link
Member

@wallymathieu wallymathieu commented Mar 19, 2023

  • Adjust code in order for Fable4 compilation to work
  • Add CI to test Fable3 and Fable4 compilation

@wallymathieu
Copy link
Member Author

Based on comment :
#537 (comment)
Let us try out to see what happens when you compile with Fable4

@wallymathieu
Copy link
Member Author

After adding checks for Fable4 I'm getting:

./../../src/FSharpPlus/Control/Functor.fs(1,1): error FABLE: Cannot have two module members with same name: Map_Map_257C72F5
./../../src/FSharpPlus/Control/Functor.fs(1,1): error FABLE: Cannot have two module members with same name: Unzip_Unzip_Z1EFE1B1E
./../../src/FSharpPlus/Control/Functor.fs(1,1): error FABLE: Cannot have two module members with same name: Zip_Zip_7A9EA139
./../../src/FSharpPlus/Control/Functor.fs(1,1): error FABLE: Cannot have two module members with same name: Dimap_Dimap_5ECA39C1
./../../src/FSharpPlus/Control/Functor.fs(1,1): error FABLE: Cannot have two module members with same name: Contramap_Contramap_Z16BE31C1
./../../src/FSharpPlus/Control/Invokable.fs(1,1): error FABLE: Cannot have two module members with same name: Invoke_Invoke_56C4DC00
./../../src/FSharpPlus/Control/Category.fs(1,1): error FABLE: Cannot have two module members with same name: Id_Id_6D84815D
./../../src/FSharpPlus/Control/Category.fs(1,1): error FABLE: Cannot have two module members with same name: Comp_$003C$003C$003C_Z7E4A116E
./../../src/FSharpPlus/Control/Arrow.fs(1,1): error FABLE: Cannot have two module members with same name: Arr_Arr_Z242EF1B9
./../../src/FSharpPlus/Control/Arrow.fs(1,1): error FABLE: Cannot have two module members with same name: ArrFirst_First_7EEFD19D
./../../src/FSharpPlus/Control/Arrow.fs(1,1): error FABLE: Cannot have two module members with same name: ArrSecond_Second_A1C8017
./../../src/FSharpPlus/Control/Arrow.fs(1,1): error FABLE: Cannot have two module members with same name: ArrCombine_$002A$002A$002A_Z5FDD3AD0
./../../src/FSharpPlus/Control/Arrow.fs(1,1): error FABLE: Cannot have two module members with same name: Fanout_$0026$0026$0026_Z5CA5C083
./../../src/FSharpPlus/Control/ArrowApply.fs(1,1): error FABLE: Cannot have two module members with same name: App_App_257C63C8
./../../src/FSharpPlus/Control/ArrowChoice.fs(1,1): error FABLE: Cannot have two module members with same name: Fanin_$007C$007C$007C_Z22DED874
./../../src/FSharpPlus/Control/ArrowChoice.fs(1,1): error FABLE: Cannot have two module members with same name: AcMerge_$002B$002B$002B_Z75846F16
./../../src/FSharpPlus/Control/Monad.fs(129,52): (129,130) error FABLE: Cannot resolve trait call Return - Inline call from .(142,83) < ../../../tests/FSharpPlusFable.Tests/FSharpTests/General/Monad.fs(29,12)

The interesting part seem to be Cannot have two module members with same name

@wallymathieu wallymathieu mentioned this pull request Mar 30, 2023
@reinux
Copy link

reinux commented May 12, 2023

Hey, don't mean to nag, but do you think you'll be able to get around to this anytime soon?

If not it's totally cool, I can put off the UI portions of my project for now or just skip FSharpPlus on the frontend.

@lukaszkrzywizna
Copy link

I can put off the UI portions of my project for now or just skip FSharpPlus on the frontend.

I have the same problem. Maybe we can help somehow? It would be very helpful if we know if there are any plans to support this in the near future (or not) :)

@wallymathieu
Copy link
Member Author

Unless something changes with Fable 4, the solution requires the if def removal of quite a lot of overloaded class methods. Perhaps we can sync with Fable team.

@wallymathieu
Copy link
Member Author

wallymathieu commented Jul 5, 2023

Perhaps the goal of Fable4 is to improve compiler performance but pulling back on some F# language features. Since frontend developers expect different compiler performance than many backend programmers, that might make a lot of sense.

@wallymathieu
Copy link
Member Author

wallymathieu commented Jul 5, 2023

Hey, don't mean to nag, but do you think you'll be able to get around to this anytime soon?

If not it's totally cool, I can put off the UI portions of my project for now or just skip FSharpPlus on the frontend.

Main reason why this PR has been left dangling has been that I've been quite busy with lots of work thus have not had time to spend any so much time on open source (not directly related to project/contract/whatnot).

@wallymathieu wallymathieu requested a review from gusty July 5, 2023 17:41
@wallymathieu wallymathieu marked this pull request as ready for review July 5, 2023 17:42
This reverts commit 471befe.
@reinux
Copy link

reinux commented Jul 5, 2023

All good, thanks!

@wallymathieu wallymathieu merged commit 5461162 into master Jul 6, 2023
6 checks passed
@wallymathieu wallymathieu deleted the fable4 branch July 6, 2023 05:03
@lukaszkrzywizna
Copy link

Thank you so much! This lib is a great piece of code and helps me (and my team) a lot! One more time thank you! :)

@lukaszkrzywizna
Copy link

Last question: when do you plan to release a new version?

@wallymathieu
Copy link
Member Author

I've uploaded a pre-release package on NuGet, please have a look if it works ok
https://www.nuget.org/packages/FSharpPlus/1.4.1-v1.4-CI03263

@lukaszkrzywizna
Copy link

Unfortunately, there is still an error:
image
client: .\src\SaferLab.Client\Pages\Index.fs(32,21): (32,24) error FSHARP: Expecting a type supporting the operator '|>>' but given a function type. You may be missing an argument to a function. (code 43)

@wallymathieu
Copy link
Member Author

The best thing would be to submit a lot of the use cases you have as tests and see if we can get it to work. Some of the issues are due to the fact that Fable 4 does not support the same overloading as seen in Fable 3.

@wallymathieu
Copy link
Member Author

That operator is not available in Fable 4 version of F#+ due to limitations in Fable. In order to implement the operators you would probably need to use other mechanisms to implement those features (JavaScript runtime polymorpism).

@wallymathieu
Copy link
Member Author

Though, some features might not be possible due to the absence of type information in the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants