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

New copy-and-update warnings with Fable 4.4 #3567

Closed
forki opened this issue Oct 25, 2023 · 9 comments
Closed

New copy-and-update warnings with Fable 4.4 #3567

forki opened this issue Oct 25, 2023 · 9 comments

Comments

@forki
Copy link
Collaborator

forki commented Oct 25, 2023

It looks like Fable 4.4 is using F# 8 features and also emits F# 8 warnings:

We see LOTS of new warnings. Things like:

warning FSHARP: This copy-and-update record expression changes all fields of record type 'MyRecordType'. Consider using the record construction syntax instead. (code 3560)

@MangelMaxime @ncave Is this expected?

references dotnet/fsharp#16182

@ncave
Copy link
Collaborator

ncave commented Oct 25, 2023

@forki You are correct, sounds like a lot of people have concerns about warning 3560 and so it will be turned off by default in F# 8.0 final (post-RC2). It hasn't been merged in F# main yet, but I can cherry-pick it and have a new build shortly.

@nojaf
Copy link
Member

nojaf commented Oct 25, 2023

Add <NoWarn>$(NoWarn);FS3560</NoWarn> for now.

@forki
Copy link
Collaborator Author

forki commented Oct 25, 2023

@nojaf it's not just that particular one. there are more. But yes that is a valid workaround

@nojaf
Copy link
Member

nojaf commented Oct 25, 2023

@ncave is --langversion being passed to FCS as an argument?

@ncave
Copy link
Collaborator

ncave commented Oct 25, 2023

I updated FCS in #3568 to turn off 3560 by default, it will be in the next release.
++ @MangelMaxime

@ncave
Copy link
Collaborator

ncave commented Oct 25, 2023

@nojaf

is --langversion being passed to FCS as an argument?

I believe so, not sure as an Fable CLI argument, but most of what's in your .fsproj will be passed to FCS.
Looks like the project cracker will pick it up, either as an Fable CLI argument or if it's in your .fsproj.

@MangelMaxime
Copy link
Member

MangelMaxime commented Oct 25, 2023

Thank you @ncave.

I just released a new version, @forki can you please check if this fixed all the warnings you had?

@forki
Copy link
Collaborator Author

forki commented Oct 25, 2023 via email

@forki
Copy link
Collaborator Author

forki commented Oct 26, 2023

yes it works. Thank's a lot.

@forki forki closed this as completed Oct 26, 2023
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

No branches or pull requests

4 participants