Skip to content

Commit

Permalink
Merge branch 'main' into merges/release/dev17.3-to-main
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich committed Jul 7, 2022
2 parents 73ce445 + 1fb9708 commit 9d14c64
Show file tree
Hide file tree
Showing 673 changed files with 22,540 additions and 4,223 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines-integration-dartlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ stages:
configuration: $(_configuration)
oop64bit: $(_oop64bit)
lspEditor: false
shallowCheckout: false
skipCheckout: true
15 changes: 14 additions & 1 deletion docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# This document lists known breaking changes in Roslyn after .NET 6 all the way to .NET 7.

## Types cannot be named `file`

***Introduced in Visual Studio 2022 version 17.4.*** Starting in C# 11, types cannot be named `file`. The compiler will report an error on all such type names. To work around this, the type name and all usages must be escaped with an `@`:

```csharp
class file {} // Error CS9056
class @file {} // No error
```

This was done as `file` is now a modifier for type declarations.

You can learn more about this change in the associated [csharplang issue](https://github.com/dotnet/csharplang/issues/6011).

## Required spaces in #line span directives

***Introduced in .NET SDK 6.0.400, Visual Studio 2022 version 17.3.***
Expand Down Expand Up @@ -426,4 +439,4 @@ class @required {} // No error

This was done as `required` is now a member modifier for properties and fields.

You can learn more about this change in the associated [csharplang issue](https://github.com/dotnet/csharplang/issues/3630).
You can learn more about this change in the associated [csharplang issue](https://github.com/dotnet/csharplang/issues/3630).
1 change: 1 addition & 0 deletions docs/contributing/Compiler Test Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ This document provides guidance for thinking about language interactions and tes
# Type and members
- Access modifiers (public, protected, internal, protected internal, private protected, private), static, ref
- type declarations (class, record class/struct with or without positional members, struct, interface, type parameter)
- file-local types
- methods
- fields (required and not)
- properties (including get/set/init accessors, required and not)
Expand Down
18 changes: 9 additions & 9 deletions docs/features/incremental-generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ single time for the lifetime of the host.
Rather than a dedicated `Execute` method, an Incremental Generator instead
defines an immutable execution pipeline as part of initialization. The
`Initialize` method receives an instance of
`IncrementalGeneratorInitializationContext`which is used by the generator to
`IncrementalGeneratorInitializationContext` which is used by the generator to
define a set of transformations.


Expand Down Expand Up @@ -160,7 +160,7 @@ IValueProvider<TSource>
└─────────────┘
```

Instead, the generator supplies a set of transformations that ar to be applied to the
Instead, the generator supplies a set of transformations that are to be applied to the
data contained within the provider, which in turn creates a new value provider.

### Select
Expand Down Expand Up @@ -799,7 +799,7 @@ even though they referenced something in `file1.cs`. Because the first check is
purely _syntactic_ we can be sure the results for `file2.cs` would be the same.

While it may seem unfortunate that the driver must run the `transform` for all
selected syntax nodes, if it did not it could up producing incorrect data
selected syntax nodes, if it did not it could end up producing incorrect data
due to cross file dependencies. Because the initial syntactic check
allows the driver to substantially filter the number of nodes on which the
semantic checks have to be re-run, significantly improved performance
Expand All @@ -826,7 +826,7 @@ The set of output methods are

**RegisterSourceOutput**:

RegisterSourceOutput allows a generator author to produce source files and
`RegisterSourceOutput` allows a generator author to produce source files and
diagnostics that will be included in the users compilation. As input, it takes a
`Value[s]Provider` and an `Action<SourceProductionContext, TSource>` that will
be invoked for every value in the value provider.
Expand Down Expand Up @@ -905,15 +905,15 @@ transformations are run, meaning that it will be visible as part of the rest of
the regular execution pipeline, and an author may ask semantic questions about
it.

It is particularly useful for adding attributes to the users source code. These
can then be added by the user their code, and the generator may find the
attributed code via the semantic model.
It is particularly useful for adding attribute definitions to the users'
source code. These can then be applied by the user in their code, and the
generator may find the attributed code via the semantic model.

## Handling Cancellation

Incremental generators are designed to be used in interactive hosts such as an
IDE. As such, it is critically important that generators respect and respond to
the passed in cancellation tokens.
the passed-in cancellation tokens.

In general, it is likely that the amount of user computation performed per
transformation is low, but often will be calling into Roslyn APIs that may have
Expand Down Expand Up @@ -1033,7 +1033,7 @@ the driver knows there can be no work to be done when a `SyntaxTree` changes.

### Comparing Items

For a user provided result to be comparable across iterations, there needs to be
For a user-provided result to be comparable across iterations, there needs to be
some concept of equivalence. By default the host will use `EqualityComparer<T>`
to determine equivalence. There are obviously times where this is insufficient,
and there exists an extension method that allows the author to supply a comparer
Expand Down
Loading

0 comments on commit 9d14c64

Please sign in to comment.