Document Automatically Defined Compiler Symbols in F# Compiler Directives#45607
Closed
shethaadit wants to merge 2 commits intodotnet:mainfrom
Closed
Document Automatically Defined Compiler Symbols in F# Compiler Directives#45607shethaadit wants to merge 2 commits intodotnet:mainfrom
shethaadit wants to merge 2 commits intodotnet:mainfrom
Conversation
T-Gro
reviewed
Apr 3, 2025
Contributor
Author
|
Hi @BillWagner, @T-Gro, could you please review? |
Member
|
I'm generally OK with this one. I'd like @T-Gro to take a look before I merge. |
T-Gro
reviewed
Apr 11, 2025
| | `TRACE` | Defined when tracing is enabled in the project settings. | | ||
| | `NULLABLE` | Defined when `<Nullable>enable</Nullable>` is set in the project file. | | ||
|
|
||
| #### Target Framework Symbols |
Member
There was a problem hiding this comment.
I am sorry for the misunderstanding.
Could those be instead solved by a link to the specific SDK documentation?
This is not being defined by F# and it does naturally evolve. If we keep a duplicate here, it would also require maintenace.
I think linking this very page https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols would be best when it comes to completeness (see how many there are overall)
Member
|
@shethaadit Can you update based on @T-Gro 's comments? |
Member
|
@shethaadit Are you planning to update per @T-Gro 's comments? |
Member
|
Closing due to lack of response. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description:
This PR enhances the F# Compiler Directives documentation by adding a section on automatically defined symbols, such as
DEBUGandTRACE. These symbols are implicitly defined by the compiler in specific build configurations and can be used for conditional compilation.Changes Made:
DEBUG(enabled in Debug builds) andTRACE(enabled in tracing configurations).#if DEBUG.This update helps developers understand which symbols are pre-defined by the F# compiler and how to use them effectively.
Fixes #45478
Internal previews