* Update dependencies from https://github.com/dotnet/arcade build 20220130.1 (#57)
Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22071.6 -> To Version 7.0.0-beta.22080.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* [release/6.0.2xx] Backport CODEOWNERS (#61)
So we get appropriate notifications. Extension of https://github.com/dotnet/razor-compiler/pull/54.
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com>
* Unify Equals and GetHashCode for BoundAttributeParameterDescriptorComparer
* Unify Equals and GetHashCode for BoundAttributeDescriptorComparer
* Clean up RequiredAttributeDescriptorComparer
* Clean up TagMatchingRuleDescriptorComparer
* Clean up AllowedChildTagDescriptorComparer
* Unify Equals and GetHashCode for TagHelperDescriptorComparer
* Enforce IDE0011 (Add braces) on build
This style follows the configuration from dotnet/aspnetcore, which
intentionally deviates from the recommendation made by dotnet/runtime
and dotnet/roslyn.
* Fix all IDE0011 (Add braces)
* Use `<Nullable>enable</Nullable>` in all projects
* Add `#nullable disable` to all unannotated source files
* Update existing `#nullable` directives to preserve their current behavior
This pull request changes the default behavior for new source files to have nullable reference types enabled, but is not expected to change the meaning of any file already in the project.
Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22064.25 -> To Version 7.0.0-beta.22071.6
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Type constraints on type parameters are now globally fully qualified.
* Type parameter constraints that don't have type constraints will not incorrectly prevent a comma any longer.
Updates component code-generation to apply 'global::' as much as possible in all code we control.
Updates the baselines to reflect the changes in the generated code.
Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22056.6 -> To Version 7.0.0-beta.22064.25
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Currently the Razor compiler suppresses nullable annotations within most generated code. https://github.com/dotnet/aspnetcore/issues/39360 tracks addressing this, but that would need a fair bit of work to get right. In the meantime, https://github.com/dotnet/aspnetcore/issues/37510 is affecting a lot of users attempting to turn on nullability in their apps.
The value of the `@model` directive appears as part of the class declaration for a Razor View:
```C#
@model MyModel?
// Results in
#nullable disable
internal sealed class _Views_Home_Index : RazorPage<MyModel?> // This will produce a warning since it's not within a nullable context
```
The `#nullable disable` precludes the ability of the user to be able to specify a nullable `model`. This change updates the compiler and generates the class declaration within a nullable context, as long as the C# version is recent enough to support nullability. The generated code now looks like:
```C#
@model MyModel?
// Results in
...
#nullable restore // Use the nullability based on the project's global settings
internal sealed class _Views_Home_Index : RazorPage<MyModel?>
#nullable disable
```
In addition to the class declaration, we also need to generate the properties for `@inject` within a nullable context. This is because all views have an implicit `@inject IHtmlHelper<TModel>` where `TModel` is the model type.
Currently the Razor compiler suppresses nullable annotations within most generated code. https://github.com/dotnet/aspnetcore/issues/39360 tracks addressing this, but that would need a fair bit of work to get right. In the meantime, https://github.com/dotnet/aspnetcore/issues/37510 is affecting a lot of users attempting to turn on nullability in their apps.
The value of the `@model` directive appears as part of the class declaration for a Razor View:
```C#
@model MyModel?
// Results in
#nullable disable
internal sealed class _Views_Home_Index : RazorPage<MyModel?> // This will produce a warning since it's not within a nullable context
```
The `#nullable disable` precludes the ability of the user to be able to specify a nullable `model`. This change updates the compiler and generates the class declaration within a nullable context, as long as the C# version is recent enough to support nullability. The generated code now looks like:
```C#
@model MyModel?
// Results in
...
#nullable restore // Use the nullability based on the project's global settings
internal sealed class _Views_Home_Index : RazorPage<MyModel?>
#nullable disable
```
In addition to the class declaration, we also need to generate the properties for `@inject` within a nullable context. This is because all views have an implicit `@inject IHtmlHelper<TModel>` where `TModel` is the model type.
* Update dependencies from https://github.com/dotnet/arcade build 20211215.1
Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.21576.4 -> To Version 7.0.0-beta.21615.1
* Update dependencies from https://github.com/dotnet/arcade build 20211217.4
Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.21576.4 -> To Version 7.0.0-beta.21617.4
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/arcade build 20211210.4
Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.21576.4 -> To Version 7.0.0-beta.21610.4
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
a) Stops packaging any of the runtime packages
b) Produces new transport packages to be consumed by tooling and SDK
c) Stops packaging the Microbenchmarks package.