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

[RFC FS-1060] Nullness checking (applied to codebase) #15310

Merged
merged 303 commits into from
Aug 14, 2024

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Jun 5, 2023

This extends #15181 by applying it to the codebase itself. Getting this green is an exit criteria for #15181.

Keeping this separate from #15181 keeps us sane, as it's easiest to work on this with a Visual Studio installed with nullness checking added to the toolchain (using a build of a green-tick feature/nullness)

git checkout feature/nullness
.\build -deploy
git checkout feature/nullness-enabled
devenv VisualFSharp.sln /RootSuffix RoslynDev
.\build

This PR currently does selective enablement, hopefully by the end we enable it across the whole codebase apart from tests

@dsyme dsyme requested a review from a team as a code owner June 5, 2023 11:48
Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna block now to prevent accidental merging

@0101 0101 marked this pull request as draft July 24, 2023 17:21
T-Gro and others added 27 commits November 29, 2023 14:10
* Fixes #16359 - correctly handle imports with 0 length public key tokens (#16363)

* Parser: recover on unfinished record decls, fix field ranges (#16357)

* Parser: recover on unfinished record decls, fix field ranges

* Fantomas

* Better diagnostic ranges for fields

* More parser tests

* Update surface area

* Fix xml doc test

* Update baselines

* Update src/Compiler/SyntaxTree/SyntaxTree.fsi

Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>

* Add MutableKeyword to SynFieldTrivia. (#11)

* Simplify

* Fantomas

---------

Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>

---------

Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
Co-authored-by: Eugene Auduchinok <eugene.auduchinok@jetbrains.com>
Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
* [main] Update dependencies from dnceng/internal/dotnet-optimization (#16150)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231019.5

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23519.5

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231019.5

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23519.5

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231021.3

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23521.3

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231021.3

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23521.3

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* [main] Update dependencies from dotnet/arcade (#16241)

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

* Name resolution: don't search extension members in type abbreviations (#16390)

* Name resolution: don't search extension members in type abbreviations

* Add test

* Revert "[main] Update dependencies from dotnet/arcade (#16241)" (#16396)

This reverts commit f219a99.

* trimmed size updated

---------

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
Co-authored-by: Eugene Auduchinok <eugene.auduchinok@jetbrains.com>
…epresentation of a type) (#16555)

* failing test

* todo for IL import

* explanation added

* il meta parsing

* flags evaluation

* you shall passs

* evaluateFirstOrderNullnessAndAdvance

* import il type with nullness

* type import

* IL nullness import

fields, props, events, method args, method return types - nullness imported from IL

* test rename

* fantomas

* get stack trace on error

* split ilmethod's type

* fix crashes for Csharp style extensions

* solve coexistance of nullness and Is* properties of DUs

* updating tests

* clean tests

* fantomas

* fantomas one more time

* importing nullness for generic typars

* print failing ivals, let's see

* write even more!

* isolated failing test - combo of module rec, signature file, IVT

* another attempt

* format

* test

* hide tests

* Remove 'specialname' for DU case tester

* format

* warning as error

* update baseline netcore

* nullable errors not in desktop framework

* surface area, trimming

* surface area

* cosmetic cleanup & annotations

* Rename to ILMethParentTypeInfo

* making vMapFold tail recursive

* physical nullnessEquiv

* format

* Commenting SkipNullness usages

* Nullness work - activity module

* Remove strict generic 'T:null' import

* Null|NonNull pattern also for regular compilation

* Backported Null|NonNull active pattern

* one more time

* revert

* Show nullness in quickinfo and in general in type representations
Merge of main + syntax conflict resolution + semantic conflict resolution
Copy link

Pull request contains merge conflicts.

@T-Gro T-Gro added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Jul 31, 2024
@dotnet dotnet deleted a comment from github-actions bot Jul 31, 2024
Copy link
Contributor

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@T-Gro T-Gro self-requested a review July 31, 2024 10:19
@T-Gro T-Gro dismissed their stale review July 31, 2024 11:40

Blocker waived

@vzarytovskii vzarytovskii modified the milestones: July-2024, August-2024 Jul 31, 2024
@T-Gro T-Gro enabled auto-merge (squash) August 13, 2024 14:52
@T-Gro
Copy link
Member

T-Gro commented Aug 14, 2024

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@T-Gro T-Gro merged commit ccd0de1 into main Aug 14, 2024
30 checks passed
@T-Gro T-Gro deleted the revert-15309-revert-15265-feature/nullness-enabled branch August 14, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants