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

Merge v6 standard updates into the v7 branch #535

Merged
merged 263 commits into from
Mar 31, 2022

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Mar 31, 2022

These updates were done via merge, not rebase.

This PR should NOT be squashed, or we'll lose history from prior PRs.

BillWagner and others added 30 commits November 30, 2020 16:59
A number of related changes:
- Where a PR exists for a feature, reference that PR.
- Add issues for any feature that doesn't have a current issue.
Also reports the counts of errors and warnings.
This will run on any PR and any push.

At the moment we expect this to fail with an error due to a problem
in the standard with a link to interpolated string literals.
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
C# 6.0: Specify zero return for fixing a null or empty array.
This is all that's needed to allow `await` in `finally` and `catch` clauses.
Per committee meeting, and discussion with .NET Foundation executive director, we're using the Creative Commons v4 attribution license, and the MIT license for tools code.
* generate ANTLR file

Rework the bat file to generate an ANTLR file, and update the grammar in the standard.

Note that this does pick up a couple PRs that affected the grammar.

* add section numbers to grammar

I think this will help us validate the grammar and fix validation errors.

* The getgrammar tool runs as a shell script.

* script now runs in the tools folder.

* run grammar validation

* add github workflow

* update script to generate annex

* respond to feedback.
jskeet and others added 24 commits March 17, 2022 18:40
The largest change (basic-concepts.md) also puts the list properly inside the note by quoting it.
These weren't detected by the tool, but identified in dotnet#435. That means there may be others, of course.

The indentation of lists in notes still needs work.
This then enables the paragraphs following them to be correctly within the table. This change is just whitespace.

Fixes dotnet#441.

The change around line 5612 is to replace a tab with four spaces.
Fixes dotnet#435 (and extract some constants which were duplicated in many places)
Also link to the constructed types clause for all kinds of type,
which clarifies why we classify nested types that don't themselves
declare type parameters as generic types.

Fixes dotnet#482.
This was originally intended to find examples with over-long lines, but found a bunch of minor issues along the way.

Fixes dotnet#511 as far as I think we want to - I don't think it's worth going to extraordinary lengths to detect the issues.
* fix formatting nits

* fix formatting nits

* fix formatting nits

* Fix formatting nits

* Fix formatting nits

* Fix formatting nits

* Fix formatting nits

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Smarten doesn't run on every PR now. It will only run on demand.

I also updated the package based on Nigel's recent updates. This didn't fix the problem Jon identified with indenting tables.

The update-on-merge workflow doesn't run smarten now.
* configure markdown lint

First configuration of markdown lint. We can determine which warnings we want to enable or disable from a first test run.

* disable a few items

- Disable long line lengths. (We use hard breaks for paragraphs)
- Disable inline HTML.

* add default problem matcher

* Disable rules currently generating warngs.

A couple note on this commit:

MD034 is for "raw URL link". The standard contains the link to the ECMA site, which is intentional. If it helps the word converter, that can be formatted using markdown's `[]()` syntax.

MD30 and MD31 will be the two biggest jobs.

Also, some of the warnings are generated from the markdown source in the test project. I think the right move will be to update those test sources once the associated rules are enabled.

* missed a few...
All our grammar blocks use ANTLR instead.

Fixes dotnet#432.
* enable MD005

* fix MD005 violations, enable MD007

* fix MD007, enable MD009

* re-disable MD009 (that will be the next PR)

Also, try and fix the one issue in the word converter.

* remove extra spaces in UL list

There were two spaces between the `-` and the next text.

* Add blank link

This is a later markdown lint warning, but it is causing the word converter to fail.
* enable MD009

* fix MD009

No trailing spaces.

* 2nd pass fixing MD009, turn on MD010

* enable MD010

* Fix MD010, enable MD012

* Fix MD012
* update smarten and reenable

Build the tar file with the latest fix, then re-enable it on pull requests

* comment out smarten again

The issue with the table spacing isn't fixed yet.
* Enable MD022

* enable MD027

* Fix MD022

* Enable MD028

* Fix MD0027: extra spaces in blockquote.

* Fix MD027

* More MD028

* Missed one warning.

* removed stray character

* ugh one more warning.

* make 2 examples normative

Co-authored-by: Rex Jaeschke <rex@RexJaeschke.com>
Co-authored-by: BillWagner <BillWagner@users.noreply.github.com>
* Incorporate Better Betterness

This commit adds the notes from https://github.com/dotnet/roslyn/blob/main/docs/specs/CSharp%206/Better%20Betterness.md

* Incorporate changes from dotnet#283

Issue dotnet#283 contains notes for how the implementation differed from the proposed better betterness text.

* compat for delegate conversion

This commit brings in the method group conversion fix that caused dotnet/roslyn#6750

It needs wordsmithing for a number of reasons:
- "corresponding argument" isn't defined.
- the section references itself.
- I think there may have been requirements from the prior commit regarding delegates and expressions that are still needed.

* initial feedback.

* section reference

* a bit of editing

* I think this gets close

This gets close to what's implemented in C# 6.0.

I think this fails as a description in the case of dotnet#499

For 7.3, it would be better to describe that change in the section on Method Group conversion.

* review from the meeting.

* fix awkward grammar

* limit bullet to method group conversion.
* [create-pull-request] automated change

* Update standard/expressions.md

Co-authored-by: BillWagner <BillWagner@users.noreply.github.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
* enable MD030

* fix MD030

These should all be whitespace-only changes.

* enable MD032

* skip 31, that will be a single PR. Use 32

* Fix MD032

Most of these are notes and examples. In most cases, the trailing *end note* was on a separate line not separated by a blank line. In many, they were at the end of the last bullet item. I normalized all to be on the last bullet item.

* Enable MD036

* re-disable MD036. Enable MD037

* Remove extra space in italicized words.

* enable MD038

* Fix MD038

These are inline code fences where one of the back-ticks was either missing, or misplaced.

* enable MD040

* Fix MD040

The only occurrences are in the tools/GetGrammar folder. These files are added by the tool, and insert the closing codefence. They are false positives. So, disable checking in that folder. We'll catch any mistakes there by linting the tool output on the automated PRs.

* enable MD041

* Update yml

Caught while testing.

* enable MD047

* enable MD050

* Fix MD050

Strong style should be consistent.
* enable MD031

* Blank lines surrounding samples
* format *end note*

The *end note* marker for a note should be at the end of a single paragraph note. If a note spans multiple paragraphs (including notes that contain examples or lists), the *end note* marker should be its own paragraph.

* Format *end example*

The *end example* marker for a note should be at the end of a single paragraph note. If a note spans multiple paragraphs (including notes that contain examples or lists), the *end example* marker should be its own paragraph.

* fix lint warnings.

* fix markdown converter issues

One example and one note had their final paragraph not included in the block quote.

* add link to comment on code change

This code change may be wrong. See comment.
@BillWagner BillWagner changed the base branch from draft-v6 to draft-v7 March 31, 2022 14:52
@BillWagner BillWagner requested a review from jskeet March 31, 2022 14:53
Copy link
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

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

I'm going to approve, but I haven't looked carefully at the changes - I assume this is really just mechanical.

If there are aspects you would like me to review specifically, I can do that - but it may not be until next week.

@BillWagner
Copy link
Member Author

Thanks @jskeet It's a mechanical change. The only merge conflict was in the readme.md, and I'm confident I got that right.

I'll merge and we can move forward.

@BillWagner BillWagner merged commit 82f553c into dotnet:draft-v7 Mar 31, 2022
@BillWagner BillWagner deleted the merge-v6 branch March 31, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.