Skip to content

Commit 47912d4

Browse files
authored
Merge pull request #728 from BillWagner/merge-v7-work
Merge v7 work
2 parents a5ccd94 + 98e9bd4 commit 47912d4

File tree

126 files changed

+4192
-933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+4192
-933
lines changed

.github/workflows/grammar-validator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
grammar-validator:
16-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-latest
1717
env:
1818
DOTNET_NOLOGO: true
1919

.github/workflows/markdownlint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- draft-v6
7+
- draft-v7
78
paths:
89
- "standard/*.md"
910
- ".markdownlint.json"
@@ -30,7 +31,7 @@ jobs:
3031
- name: Use Node.js
3132
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d #@v1
3233
with:
33-
node-version: 12.x
34+
node-version: 14.x
3435
- name: Run Markdownlint
3536
run: |
3637
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"

.github/workflows/quest.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "quest import"
2+
on:
3+
issues:
4+
types:
5+
[ labeled, closed, reopened, assigned, unassigned ]
6+
pull_request:
7+
types:
8+
[ labeled, closed, assigned, unassigned ]
9+
workflow_dispatch:
10+
inputs:
11+
reason:
12+
description: "The reason for running the workflow"
13+
required: true
14+
default: "Manual run"
15+
issue:
16+
description: "The issue number to manually test"
17+
required: true
18+
19+
jobs:
20+
import:
21+
if: |
22+
github.event_name == 'workflow_dispatch' ||
23+
github.event.label.name == 'reQUEST' ||
24+
github.event.label.name == 'seQUESTered' ||
25+
contains(github.event.issue.labels.*.name, 'reQUEST') ||
26+
contains(github.event.issue.labels.*.name, 'seQUESTered')
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: write
30+
issues: write
31+
32+
steps:
33+
- name: "Print manual run reason"
34+
if: ${{ github.event_name == 'workflow_dispatch' }}
35+
run: |
36+
echo "Reason: ${{ github.event.inputs.reason }}"
37+
echo "Issue number: ${{ github.event.inputs.issue }}"
38+
39+
# This step occurs when ran manually, passing the manual issue number input
40+
- name: manual-sequester
41+
if: ${{ github.event_name == 'workflow_dispatch' }}
42+
id: manual-sequester
43+
uses: dotnet/docs-tools/actions/sequester@main
44+
env:
45+
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
46+
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
47+
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
48+
with:
49+
org: ${{ github.repository_owner }}
50+
repo: ${{ github.repository }}
51+
issue: ${{ github.event.inputs.issue }}
52+
branch: ${{ github.ref_name }}
53+
54+
# This step occurs automatically, passing the issue number from the event
55+
- name: auto-sequester
56+
if: ${{ github.event_name != 'workflow_dispatch' }}
57+
id: auto-sequester
58+
uses: dotnet/docs-tools/actions/sequester@main
59+
env:
60+
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
61+
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
62+
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
63+
with:
64+
org: ${{ github.repository_owner }}
65+
repo: ${{ github.repository }}
66+
issue: ${{ github.event.issue.number }}
67+
branch: ${{ github.ref_name }}
68+

.github/workflows/renumber-sections.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
renumber-sections:
16-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-latest
1717
env:
1818
DOTNET_NOLOGO: true
1919

.github/workflows/test-examples.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test examples
2+
3+
# Triggers the workflow on pull request events that update the branch
4+
on:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
paths:
8+
- '/standard/*.md'
9+
workflow_dispatch:
10+
inputs:
11+
reason:
12+
description: 'The reason for running the workflow'
13+
required: true
14+
default: 'Manual run'
15+
16+
jobs:
17+
test-extraction-and-runner:
18+
runs-on: ubuntu-latest
19+
env:
20+
DOTNET_NOLOGO: true
21+
22+
steps:
23+
- name: Check out our repo
24+
uses: actions/checkout@v2
25+
26+
- name: Setup .NET 6.0
27+
uses: actions/setup-dotnet@v1
28+
with:
29+
dotnet-version: 6.0.x
30+
31+
- name: Extract and validate tests
32+
run: |
33+
cd tools
34+
./test-examples.sh

.github/workflows/tools-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ on:
1616
default: 'Manual run'
1717

1818
jobs:
19-
word-converter:
20-
runs-on: ubuntu-18.04
19+
run-unit-tests:
20+
runs-on: ubuntu-latest
2121
env:
2222
DOTNET_NOLOGO: true
2323

.github/workflows/update-on-merge.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ name: Update spec on merge
55
on:
66
push:
77
branches:
8-
- draft-v6
8+
- draft-v6
9+
- draft-v7
910
workflow_dispatch:
1011
inputs:
1112
reason:

.github/workflows/word-converter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
word-converter:
16-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-latest
1717
env:
1818
DOTNET_NOLOGO: true
1919

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ This project has adopted the code of conduct defined by the Contributor Covenant
99

1010
## C# Language Specification
1111

12-
### C# 6.0 draft
12+
### C# 7.0 draft
1313

14-
The branch `draft-v6` has the draft text for C# 6.0. It has not been submitted as a formal standard to ECMA. This version is a working draft that contains the features for C# 6.0.
14+
The branch `draft-v7` has the draft text for C# 7.0. It has not been submitted as a formal standard to ECMA. This version is a working draft that contains the features for C# 7.0.
15+
16+
### C# 6.0 standard
17+
18+
The branch `standard-v6` has the ECMA C# C# 6.0 standard text, in Markdown format. For the official standard, see the [ECMA site](https://www.ecma-international.org/publications-and-standards/standards/ecma-334/).
1519

1620
### C# 5.0 standard
1721

@@ -23,6 +27,14 @@ This version is stored in this branch as a base markdown version to compare with
2327
(This document is also available for download: [csharp.pdf](CSharp%20Language%20Specification.pdf?raw=true) and [csharp.docx](CSharp%20Language%20Specification.docx?raw=true))
2428
-->
2529

30+
### Comments within the standard
31+
32+
There are HTML comments (`<!-- comment -->`) within the standard for the sake of tooling. Some help in the process of converting the standard to Word, and others are for automated testing purposes.
33+
34+
Some automated test comments refer to error codes that are specific to the Microsoft C# compiler (e.g. "CS0509") to test that compilation fails as expected, where an example presents deliberately-invalid code. These error codes are not part of the standard, and should not be viewed as any kind of compliance check for other compilers.
35+
36+
More broadly, *no* comments should be regarded as being part of the standard itself.
37+
2638
## Admin folder
2739

2840
A home for adminstrative files (such as [eventually] meeting agendas and minutes).
@@ -53,6 +65,12 @@ This tool creates the outline using section numbers, and updates all links to th
5365

5466
Contributors that add sections should follow the guidance in our [contributor guide](CONTRIBUTING.md#how-to-add-or-remove-clauses) to ensure that links to new sections are incorporated correctly. This tool is run on each PR in a `dry-run` mode to ensure that the changes will parse correctly. When a PR is merged, the tool runs to update all section links.
5567

68+
### ExampleExtractor and ExampleTester
69+
70+
These two tools work in tandem to test that the examples presented work (or fail, where invalid code is presented) as expected.
71+
72+
ExampleExtractor populates a temporary directory with code and metadata extracted from the standard. ExampleTester then compiles and runs (where applicable) that code. The test-examples.sh script provides an easy way of running both tools together.
73+
5674
## .NET Foundation
5775

5876
This project is supported by the [.NET Foundation](https://dotnetfoundation.org).

admin/v6-feature-tracker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To find out what was new/different in v6, Rex used two main sources:
44

5-
- The [What's New in V6](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-6) web page
5+
- The [What's New in V6](https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-6) web page
66
- The diffs that resulted when he compared the v5std md with the v6spec md.
77

88
In the latter case, he located those features that required new or changed grammar. He then found all uses of the names of grammar productions that were added/removed, so he could make adjustments to the text. As he progressed, he discovered some new features that did *not* involve grammar changes. Others have reported (small) new features as well.

0 commit comments

Comments
 (0)