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

Enable warnings for FS1178 #16428

Closed
wants to merge 4 commits into from
Closed

Enable warnings for FS1178 #16428

wants to merge 4 commits into from

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Dec 13, 2023

Description

Turns out a lot of things aren't Comparable or support Equality when turning on FS1178.

Fixes # (issue, if applicable)

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succint description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/releae-notes/Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Examples of release notes entries:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@nojaf nojaf requested a review from a team as a code owner December 13, 2023 10:08
@psfinaki
Copy link
Member

That looks promising! :) Why not keep WarnOn in the project files btw?

@nojaf
Copy link
Contributor Author

nojaf commented Dec 13, 2023

The pars.fsy files generate a type which also requires the attributes.
This made the build fail because of warnings as errors.
FsYacc would need to support the generation of the attributes first.

@vzarytovskii
Copy link
Member

vzarytovskii commented Dec 18, 2023

@T-Gro will this interfere with your nullable work a lot? I suppose not. Wanted to just make sure we don't end up in the same situation as we did with Is* properties.

@T-Gro
Copy link
Member

T-Gro commented Dec 18, 2023

I do not see this creating bugs, rather syntactical pain.

@nojaf : Did you use any tooling/scripting to make this PR?
This will need to be re-applied when merging this into the feature/nullness branch.

@nojaf
Copy link
Contributor Author

nojaf commented Dec 18, 2023

@nojaf : Did you use any tooling/scripting to make this PR?

No, I just enabled the flag and followed the warnings generated by the IDE.
You technically won't need to do this in the nullness branch, as the flag was removed.
The reason for that is that lex/yacc generated files contain generated types where the attribute is missing.

@nojaf nojaf closed this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants