-
Notifications
You must be signed in to change notification settings - Fork 6k
Document Automatically Defined Compiler Symbols in F# Compiler Directives #45607
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
base: main
Are you sure you want to change the base?
Conversation
Hi @BillWagner, @T-Gro, could you please review? |
I'm generally OK with this one. I'd like @T-Gro to take a look before I merge. |
| `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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
@shethaadit Can you update based on @T-Gro 's comments? |
PR Description:
This PR enhances the F# Compiler Directives documentation by adding a section on automatically defined symbols, such as
DEBUG
andTRACE
. 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