-
Notifications
You must be signed in to change notification settings - Fork 816
Compiler codebase chore :: Hash directives around nullness syntax are not needed anymore #18061
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
Comments
I can do it all i need is is a bit guidance on where these codes are from anyone familiar with the codebase. |
Hello @progressive-galib , I will be happy to assist. I would first recommend to start with the compiler (FSharp.Compiler.Service.fsproj and projects depending on it) itself, and do FSharp.Core separately later. In VisualFsharp.sln solution, you search for usages of "NO_CHECKNULLS" directive. There is a single file (which is being referenced from multiple projects) called NullnessShims.fs That file uses that directive as well to provide two alternate versions of types/functions. I definitely recommend to go with full-text search to find all the places and not rely on "Find references". Reason is, hash directives are branching the code even for tooling and some paths might not be found because of it. |
already started |
You might experience diagnostics in files in the The build task is a code generator which is located in the same repository - it is part of the FSharp.Build.fsproj project. |
"#if" directive around nullness removed from src/Compiler/TypedTree/TypedTreePickle.fs and refactored. Fixes dotnet#18061 (partially)
"#if" directive around nullness removed from src Related: dotnet#18061 (partially addresses) - [x] Release notes entry updated: in `docs/release-notes/.FSharp.Compiler.Service/9.0.200.md`,
from src/Compiler/Utilities/HashMultiMap.fs and fsi Related: dotnet#18061 (partially addresses) <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> - [x] Release notes entry updated: in `docs/release-notes/.FSharp.Compiler.Service/9.0.200.md`,
…nager/DependencyProvider.fs and refactored. (#18207) * /Compiler/TypedTree/TypedTreePickle.fs refactored. "#if" directive around nullness removed from src Related: #18061 (partially addresses) - [x] Release notes entry updated: in `docs/release-notes/.FSharp.Compiler.Service/9.0.200.md`, * try 2 * refactoring * . * . * lets hope this works * . * fantomas tried with a bit of tricks DependencyProvider.fs * fantomas ignore * unformat --------- Co-authored-by: Petr <[email protected]>
While the nullness feature was being developed, the previous compiler (LKG = Last Known Good) did not understand nullness syntax ("not null", | null).
Which lead to null-relevant code surrounded in "#if" directives, to make it compile both under the .NET8 compiler as well as the new .NET9 one.
With .NET being out, those should not be needed anymore.
The same would apply to wrapper types created in order to limit the number of "#if" directives, pretty much most of the NullnessShims.fs file and the broad usage of the "MaybeNull" wrapper.
This can be done incrementally.
The text was updated successfully, but these errors were encountered: