Skip to content

Reimagine C# compiler options section - #22797

Merged
BillWagner merged 28 commits into
dotnet:mainfrom
BillWagner:consolidate-compiler-options
Mar 14, 2021
Merged

BillWagner merged 28 commits into
dotnet:mainfrom
BillWagner:consolidate-compiler-options

Conversation

@BillWagner

@BillWagner BillWagner commented Feb 11, 2021 •

Copy link
Copy Markdown
Member

Fixes #22659 (for this task)

Currently open issues on the compiler options sections

Fixes #20061
Fixes #20162
Fixes #18371
Fixes #22460
Fixes #6773

Closed as "won't fix" articles on the compiler options sections that were fixed in this PR

Fixes #17370
Fixes #4192

Guidance for reviewers:

The work done here is to consolidate all the compiler options pages into groups. Instead of a single page for each option, this organization groups options by usage. In addition, the existing pages all used the "classic" syntax. The updates focus on the new MSBuild syntax, but provides the csc alternative for existing users and translation to the updated syntax.

This is a large PR, but it's focused in concept. One option is to review it commit by commit. Each of the early commits simplify one section. Later commits fix links to the files that were deleted.

Another option is to review the files by type of change:

  • deleted files: These are the old option files. Content was moved into one of the combined files.
  • new files: These are the new combined option files. Each has a theme. The main content change was to remove redundant content, and update to focus on the new MSBuild syntax.
  • update link destinations: The changes in other areas of the .NET docs are links to C# compiler options. These have been updated to point to the updated file and anchor.

Notes on changes:

Most of the changes involved moving content, and trimming that content. In addition old options were translated to the new MSBuild options. There are a few exceptions to this: the -bugreport option is no longer supported. The errorreport option should be used instead. The recurse option is no longer supported, and was removed. Most links were updated to use the new MSBuild syntax. A couple places that weren't were for compiler errors where the order of the compiler options impacted the error. These links continued to use the old syntax.

Review site link This goes to the index for the section with new content.

@dotnet-bot dotnet-bot added this to the February 2021 milestone Feb 11, 2021
@BillWagner
BillWagner force-pushed the consolidate-compiler-options branch 2 times, most recently from 2a4332c to cd1c14d Compare February 16, 2021 19:45
@BillWagner
BillWagner force-pushed the consolidate-compiler-options branch from a641103 to 7935982 Compare February 22, 2021 19:52
@BillWagner
BillWagner force-pushed the consolidate-compiler-options branch 3 times, most recently from ed6d700 to a1893c5 Compare March 3, 2021 20:07
@BillWagner BillWagner modified the milestones: February 2021, March 2021 Mar 5, 2021
Base automatically changed from master to main March 5, 2021 23:33
@BillWagner
BillWagner force-pushed the consolidate-compiler-options branch from 362551e to 522f35d Compare March 10, 2021 02:17
@BillWagner
BillWagner force-pushed the consolidate-compiler-options branch from 6a63eaa to 8934ac6 Compare March 11, 2021 21:31
@BillWagner BillWagner changed the title re-implement command line options section Reimagine C# compiler options section Mar 12, 2021
@BillWagner
BillWagner marked this pull request as ready for review March 12, 2021 16:10

@tdykstra tdykstra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work -- This was a major undertaking and it's a big improvement for this part of the TOC -- easier for readers to browse options and easier for us to maintain them. I have mostly minor style suggestions. I learned some new things reading through all this material. 😄

BillWagner and others added 6 commits March 13, 2021 10:43
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
@BillWagner
BillWagner merged commit 3191901 into dotnet:main Mar 14, 2021
@BillWagner
BillWagner deleted the consolidate-compiler-options branch March 14, 2021 20:19

An internal compiler error (ICE) results when the compiler can't process a source code file. When an ICE occurs, the compiler doesn't produce an output file or any useful diagnostic that you can use to fix your code.

By using **ErrorReport**, you can provide ICE information to the C# team. Your error reports can help improve future compiler releases. A user's ability to send reports depends on computer and user policy permissions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't believe the ErrorReport property does what you claim here. Filed #23323 as this PR has already been merged.

},
{
"source_path": "docs/csharp/language-reference/compiler-options/refout-compiler-option.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-options/optimizations"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@BillWagner This doesn't seem to be a valid redirect target. Where should this redirect actually go?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have a PR to fix it.

Comment on lines +237 to +239
```xml
<ErrorEndLocation>filename</ErrorEndLocation>
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Filed #27368 about filename.

BillWagner added a commit to BillWagner/docs that referenced this pull request May 16, 2024
Fixes dotnet#40355

I also checked other files deleted in dotnet#22797 and nothing else was lost.
BillWagner added a commit that referenced this pull request May 20, 2024
Fixes #40355

I also checked other files deleted in #22797 and nothing else was lost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

6 participants