Skip to content

Commit d5c00bc

Browse files
committed
Merge branch 'release/9.0.1xx' of https://github.com/dotnet/sdk into merge/release/8.0.4xx-to-release/9.0.1xx
2 parents fe73c6d + 34f0096 commit d5c00bc

File tree

6,175 files changed

+646635
-147331
lines changed

Some content is hidden

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

6,175 files changed

+646635
-147331
lines changed

.config/dotnet-tools.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"microsoft.dotnet.darc": {
6+
"version": "1.1.0-beta.24367.3",
7+
"commands": [
8+
"darc"
9+
]
10+
}
11+
}
12+
}

.devcontainer/devcontainer.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// For format details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "dotnet",
4+
"image": "mcr.microsoft.com/devcontainers/base:debian",
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
"ms-dotnettools.csdevkit",
9+
"EditorConfig.EditorConfig",
10+
"DavidAnson.vscode-markdownlint"
11+
]
12+
}
13+
},
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
"postCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/post-creation.sh",
16+
// Add the locally installed dotnet to the path to ensure that it is activated
17+
// This is needed so that things like the C# extension can resolve the correct SDK version
18+
"remoteEnv": {
19+
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
20+
"DOTNET_INSTALL_DIR": "${containerWorkspaceFolder}/.dotnet",
21+
"DOTNET_MULTILEVEL_LOOKUP": "0",
22+
"DOTNET_ROOT": "${containerWorkspaceFolder}/.dotnet",
23+
"DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR": "${containerWorkspaceFolder}/.dotnet",
24+
"NUGET_PACKAGES": "/home/vscode/.nuget/packages"
25+
}
26+
}
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Install SDK and tool dependencies before container starts
2+
# Also run the full restore on the repo so that go-to definition
3+
# and other language features will be available in C# files
4+
./restore.sh

.devcontainer/vmr/README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
######## ######## ### ######## ######## ## ## #### ######
3+
## ## ## ## ## ## ## ## ## ## ## ## ##
4+
## ## ## ## ## ## ## ## ## ## ## ##
5+
######## ###### ## ## ## ## ## ######### ## ######
6+
## ## ## ######### ## ## ## ## ## ## ##
7+
## ## ## ## ## ## ## ## ## ## ## ## ##
8+
## ## ######## ## ## ######## ## ## ## #### ######
9+
-->
10+
11+
This Codespace allows you to debug or make changes to the .NET SDK product. In case you ran this
12+
from a `dotnet/sdk` PR branch, the directory tree contains the VMR (`dotnet/dotnet`) checked out into
13+
`/workspaces/dotnet` with the PR changes pulled into it. Building the VMR from the codespace mimics
14+
what the VMR pipelines in an sdk PR are doing. The build takes about 45-75 minutes
15+
(depending on the machine spec and target OS) and, after completion, produces an archived .NET SDK located in
16+
`/workspaces/dotnet/artifacts/assets/Release`.
17+
18+
## Build the SDK
19+
20+
To build the repository, run one of the following:
21+
```bash
22+
# Microsoft based build
23+
./build.sh
24+
```
25+
or
26+
27+
```bash
28+
# Building from source only
29+
./prep-source-build.sh && ./build.sh -sb
30+
```
31+
32+
> Please note that, at this time, the build modifies some of the checked-in sources so it might
33+
be preferential to rebuild the Codespace between attempts (or reset the working tree changes).
34+
35+
For more details, see the instructions at https://github.com/dotnet/dotnet.
36+
37+
## Synchronize your changes in locally
38+
39+
When debugging the build, you have two options how to test your changes in this environment.
40+
41+
### Making changes to the VMR directly
42+
43+
You can make the changes directly to the local checkout of the VMR at `/workspaces/dotnet`. You
44+
can then try to build the VMR and see if the change works for you.
45+
46+
### Pull changes into the Codespace from your fork
47+
48+
You can also make a fix in the individual source repository (e.g. `dotnet/runtime`) and push the
49+
fix into a branch; can be in your fork too. Once you have the commit pushed, you can pull this
50+
version of the repository into the Codespace by running:
51+
52+
```
53+
/workspaces/synchronize-vmr.sh \
54+
--repository <repo>:<commit, tag or branch> \
55+
--remote <repo>:<fork URI>
56+
```
57+
58+
You can now proceed building the VMR in the Codespace using instructions above. You can repeat
59+
this process and sync a new commit from your fork. Only note that, at this time, Source-Build
60+
modifies some of the checked-in sources so you'll need to revert the working tree changes
61+
between attempts.

.devcontainer/vmr/devcontainer.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Container suitable for investigating issues with source build
2+
// Contains the VMR (dotnet/dotnet) with applied changes from the current PR
3+
// The container supports source-building the SDK
4+
{
5+
"name": "VMR with PR changes",
6+
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39",
7+
"hostRequirements": {
8+
// A completely source built .NET is >64 GB with all the repos/artifacts
9+
"storage": "128gb"
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"ms-dotnettools.csharp"
15+
]
16+
},
17+
"codespaces": {
18+
"openFiles": [
19+
"sdk/.devcontainer/vmr/README.md"
20+
]
21+
}
22+
},
23+
"onCreateCommand": "${containerWorkspaceFolder}/sdk/.devcontainer/vmr/init.sh",
24+
"workspaceFolder": "/workspaces"
25+
}

.devcontainer/vmr/init.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
source="${BASH_SOURCE[0]}"
6+
script_root="$( cd -P "$( dirname "$source" )" && pwd )"
7+
8+
sdk_dir=$(realpath "$script_root/../..")
9+
workspace_dir=$(realpath "$sdk_dir/../")
10+
tmp_dir=$(realpath "$workspace_dir/tmp")
11+
vmr_dir=$(realpath "$workspace_dir/dotnet")
12+
13+
cp "$sdk_dir/.devcontainer/vmr/synchronize-vmr.sh" "$workspace_dir"
14+
15+
mkdir -p "$tmp_dir"
16+
17+
# Codespaces performs a shallow fetch only
18+
git -C "$sdk_dir" fetch --all --unshallow
19+
20+
# We will try to figure out, which branch is the current (PR) branch based off of
21+
# We need this to figure out, which VMR branch to use
22+
vmr_branch=$(git -C "$sdk_dir" log --pretty=format:'%D' HEAD^ \
23+
| grep 'origin/' \
24+
| head -n1 \
25+
| sed 's@origin/@@' \
26+
| sed 's@,.*@@')
27+
28+
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --debug
29+
30+
(cd "$vmr_dir" && ./prep-source-build.sh)

.devcontainer/vmr/synchronize-vmr.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
(cd /workspaces/sdk \
4+
&& ./eng/vmr-sync.sh --vmr /workspaces/dotnet --tmp /workspaces/tmp $*)

.editorconfig

+16-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ insert_final_newline = true
1111
indent_style = space
1212
indent_size = 4
1313
trim_trailing_whitespace = true
14+
spelling_exclusion_path = ./exclusion.dic
1415

1516
[*.json]
1617
indent_size = 2
@@ -273,11 +274,13 @@ dotnet_diagnostic.IDE0043.severity = warning
273274
dotnet_diagnostic.IDE0062.severity = warning
274275
# ConvertTypeOfToNameOf
275276
dotnet_diagnostic.IDE0082.severity = warning
277+
# Remove unnecessary lambda expression
278+
dotnet_diagnostic.IDE0200.severity = none
276279
# Remove redundant nullable directive
277280
dotnet_diagnostic.IDE0240.severity = warning
278281

279282
# Additional rules for template engine source code
280-
[src/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
283+
[{src,test}/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
281284
# Default analyzed API surface = 'public' (public APIs)
282285
dotnet_code_quality.api_surface = public
283286
# Provide ObsoleteAttribute message
@@ -313,7 +316,7 @@ dotnet_diagnostic.CA1838.severity = warning
313316
# Use 'Environment.CurrentManagedThreadId'
314317
dotnet_diagnostic.CA1840.severity = warning
315318
# Consider calling ConfigureAwait on the awaited task
316-
dotnet_diagnostic.CA2007.severity = warning
319+
dotnet_diagnostic.CA2007.severity = none
317320
# Do not create tasks without passing a TaskScheduler
318321
dotnet_diagnostic.CA2008.severity = warning
319322
# Use ValueTasks correctly
@@ -442,7 +445,7 @@ dotnet_diagnostic.SA1642.severity = none
442445
dotnet_diagnostic.SA1649.severity = none
443446

444447
# Disable some StyleCop rules for test common Program.cs that is linked to test project of template engine
445-
[src/Tests/Common/Program.cs]
448+
[test/Common/Program.cs]
446449
# Declare types in namespaces
447450
dotnet_diagnostic.CA1050.severity = none
448451
# Elements should be documented
@@ -453,7 +456,7 @@ dotnet_diagnostic.SA1601.severity = none
453456
dotnet_diagnostic.SA1633.severity = none
454457

455458
# Additional rules for test source code for template engine
456-
[src/Tests/{Microsoft.TemplateEngine.*,dotnet-new.Tests}/**.cs]
459+
[test/{Microsoft.TemplateEngine.*,dotnet-new.Tests}/**.cs]
457460
# Test methods should not be skipped
458461
dotnet_diagnostic.xUnit1004.severity = warning
459462
# Elements should appear in the correct order
@@ -503,5 +506,12 @@ dotnet_diagnostic.IDE0040.severity = warning
503506
[*.txt]
504507
insert_final_newline = false
505508

506-
[src/Tests/dotnet-new.Tests/**/Approvals/**]
507-
trim_trailing_whitespace = false
509+
# Verify settings
510+
[*.{received,verified}.{txt,xml,json}]
511+
charset = "utf-8-bom"
512+
end_of_line = lf
513+
indent_size = unset
514+
indent_style = unset
515+
insert_final_newline = false
516+
tab_width = unset
517+
trim_trailing_whitespace = false

.gitattributes

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,9 @@
5555

5656
*.jpg binary
5757
*.png binary
58-
*.gif binary
58+
*.gif binary
59+
60+
# VerifyTests
61+
*.verified.txt text eol=lf working-tree-encoding=UTF-8
62+
*.verified.xml text eol=lf working-tree-encoding=UTF-8
63+
*.verified.json text eol=lf working-tree-encoding=UTF-8

.github/ISSUE_TEMPLATE/config.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ contact_links:
77
- name: Issue with .NET runtime or core .NET libraries
88
url: https://github.com/dotnet/runtime/issues/new/choose
99
about: Please open issues relating to the .NET runtime or core .NET libraries in dotnet/runtime.
10-
- name: Issue with .NET SDK
11-
url: https://github.com/dotnet/sdk/issues/new/choose
12-
about: Please open issues relating to the .NET SDK itself in dotnet/sdk.
1310
- name: Issue with Entity Framework Core
1411
url: https://github.com/dotnet/efcore/issues/new/choose
1512
about: Please open issues relating to Entity Framework Core in dotnet/efcore.
1613
- name: Issue with Roslyn compiler
1714
url: https://github.com/dotnet/roslyn/issues/new/choose
18-
about: Please open issues relating to the Roslyn .NET compiler in dotnet/roslyn.
15+
about: Please open issues relating to the Roslyn .NET compiler in dotnet/roslyn.

.github/dependabot.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ updates:
1010
- "dependencies"
1111
- "dependabot: main"
1212

13-
- package-ecosystem: "nuget"
14-
directory: "/eng/dependabot"
15-
open-pull-requests-limit: 10
16-
schedule:
17-
interval: "weekly"
18-
target-branch: "release/7.0.4xx"
19-
labels:
20-
- "dependencies"
21-
- "dependabot: 7.0.4xx"
13+
# - package-ecosystem: "nuget"
14+
# directory: "/eng/dependabot"
15+
# open-pull-requests-limit: 10
16+
# schedule:
17+
# interval: "weekly"
18+
# target-branch: "release/8.0.1xx"
19+
# labels:
20+
# - "dependencies"
21+
# - "dependabot: 8.0.1xx"

0 commit comments

Comments
 (0)