Skip to content

Commit 67b0dfc

Browse files
committed
Merge remote-tracking branch 'upstream/main' into github-sve2-api
2 parents b44c9fa + 32a6d12 commit 67b0dfc

File tree

545 files changed

+9830
-20228
lines changed

Some content is hidden

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

545 files changed

+9830
-20228
lines changed

.github/copilot-instructions.md

Lines changed: 66 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
Important: **Ensure the code compiles and the tests pass.** Use the "Building & Testing in dotnet/runtime" instructions below.
1+
**Any code you commit SHOULD compile, and new and existing tests related to the change SHOULD pass.**
22

3-
Additionally,
3+
You MUST make your best effort to ensure your changes satisfy those criteria before committing. If for any reason you were unable to build or test the changes, you MUST report that. You MUST NOT claim success unless all builds and tests pass as described above.
4+
5+
You MUST refer to the [Building & Testing in dotnet/runtime](#building--testing-in-dotnetruntime) instructions and use the commands and approaches specified there before attempting your own suggestions.
6+
7+
You MUST follow all code-formatting and naming conventions defined in [`.editorconfig`](/.editorconfig).
8+
9+
In addition to the rules enforced by `.editorconfig`, you SHOULD:
410

5-
- Follow all code-formatting and naming conventions defined in `./.editorconfig`.
611
- Prefer file-scoped namespace declarations and single-line using directives.
712
- Ensure that the final return statement of a method is on its own line.
813
- Use pattern matching and switch expressions wherever possible.
@@ -17,6 +22,22 @@ Additionally,
1722

1823
# Building & Testing in dotnet/runtime
1924

25+
- [1. Prerequisites](#1-prerequisites)
26+
- [1.1. Determine Affected Components](#11-determine-affected-components)
27+
- [1.2. Baseline Setup](#12-baseline-setup)
28+
- [2. Iterative Build and Test Strategy](#2-iterative-build-and-test-strategy)
29+
- [2.1. Success Criteria](#21-success-criteria)
30+
- [3. CoreCLR (CLR) Workflow](#3-coreclr-clr-workflow)
31+
- [4. Mono Runtime Workflow](#4-mono-runtime-workflow)
32+
- [5. Libraries Workflow](#5-libraries-workflow)
33+
- [5.1. How To: Identify Affected Libraries](#51-how-to-identify-affected-libraries)
34+
- [5.2. How To: Build and Test Specific Library](#52-how-to-build-and-test-specific-library)
35+
- [6. WebAssembly (WASM) Libraries Workflow](#6-webassembly-wasm-libraries-workflow)
36+
- [7. Additional Notes](#7-additional-notes)
37+
- [7.1. Troubleshooting](#71-troubleshooting)
38+
- [7.2. Windows Command Equivalents](#72-windows-command-equivalents)
39+
- [7.3. References](#73-references)
40+
2041
## 1. Prerequisites
2142

2243
These steps need to be done **before** applying any changes.
@@ -42,7 +63,7 @@ A change is considered WASM/WASI-relevant if:
4263

4364
### 1.2. Baseline Setup
4465

45-
Ensure you have a full successful build of the needed runtime+libraries as a baseline.
66+
Before applying any changes, ensure you have a full successful build of the needed runtime+libraries as a baseline.
4667

4768
1. Checkout `main` branch
4869

@@ -53,7 +74,7 @@ Ensure you have a full successful build of the needed runtime+libraries as a bas
5374
- **WASM/WASI Libraries:** `./build.sh mono+libs -os browser`
5475

5576
3. Verify the build completed without error.
56-
- _If the build failed, report the failure and don't proceed with the changes._
77+
- _If the baseline build failed, report the failure and don't proceed with the changes._
5778

5879
4. From the repository root:
5980
- Configure PATH: `export PATH="$(pwd)/.dotnet:$PATH"`
@@ -106,14 +127,14 @@ When retrying, attempt different fixes and adjust based on the build/test result
106127
From the repository root:
107128

108129
- Build:
109-
`./build.sh -subset clr`
130+
`./build.sh clr`
110131

111132
- Run tests:
112133
`cd src/tests && ./build.sh && ./run.sh`
113134

114-
- More info:
115-
- [Building CoreCLR Guide](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/README.md)
116-
- [Building and Running CoreCLR Tests](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/coreclr/testing.md)
135+
- More info can be found in the dedicated workflow docs:
136+
- [Building CoreCLR Guide](/docs/workflow/building/coreclr/README.md)
137+
- [Building and Running CoreCLR Tests](/docs/workflow/testing/coreclr/testing.md)
117138

118139
---
119140

@@ -122,7 +143,7 @@ From the repository root:
122143
From the repository root:
123144

124145
- Build:
125-
`./build.sh -subset mono+libs`
146+
`./build.sh mono+libs`
126147

127148
- Run tests:
128149

@@ -133,25 +154,31 @@ From the repository root:
133154
./run.sh
134155
```
135156

136-
- More info:
137-
- [Building Mono](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/mono/README.md)
138-
- [Running test suites using Mono](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/mono/testing.md)
157+
- More info can be found in the dedicated workflow docs:
158+
- [Building Mono](/docs/workflow/building/mono/README.md)
159+
- [Running test suites using Mono](/docs/workflow/testing/mono/testing.md)
139160

140161
---
141162

142163
## 5. Libraries Workflow
143164

144165
From the repository root:
145166

146-
- Build:
147-
`./build.sh -subset libs -rc release`
167+
- Build all libraries:
168+
`./build.sh libs -rc release`
148169

149-
- Run tests:
150-
`./build.sh -subset libs.tests -test -rc release`
170+
- Run all tests for libraries:
171+
`./build.sh libs.tests -test -rc release`
151172

152-
- More info:
153-
- [Build Libraries](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/README.md)
154-
- [Testing Libraries](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing.md)
173+
- Build a specific library:
174+
- Refer to the section [5.2. How To: Build and Test Specific Library](#52-how-to-build-and-test-specific-library) below.
175+
176+
- Test a specific library:
177+
- Refer to the sections [5.1. How To: Identify Affected Libraries](#51-how-to-identify-affected-libraries) and [5.2. How To: Build and Test Specific Library](#52-how-to-build-and-test-specific-library) below.
178+
179+
- More info can be found in the dedicated workflow docs:
180+
- [Build Libraries](/docs/workflow/building/libraries/README.md)
181+
- [Testing Libraries](/docs/workflow/testing/libraries/testing.md)
155182

156183
### 5.1. How To: Identify Affected Libraries
157184

@@ -202,9 +229,9 @@ From the repository root:
202229
- Run tests:
203230
`./build.sh libs.tests -test -os browser`
204231

205-
- More info:
206-
- [Build libraries for WebAssembly](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/webassembly-instructions.md)
207-
- [Testing Libraries on WebAssembly](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing-wasm.md)
232+
- More info can be found in the dedicated workflow docs:
233+
- [Build libraries for WebAssembly](/docs/workflow/building/libraries/webassembly-instructions.md)
234+
- [Testing Libraries on WebAssembly](/docs/workflow/testing/libraries/testing-wasm.md)
208235

209236
---
210237

@@ -215,7 +242,7 @@ From the repository root:
215242
- **Shared Framework Missing**
216243

217244
- If the build fails with an error "The shared framework must be built before the local targeting pack can be consumed.", build both the runtime (clr or mono) and the libs.
218-
E.g., from the repo root, run `./build.sh clr+libs -rc release` if working on Libraries on CoreCLR. Refer to the section `1.2. Baseline Setup`.
245+
E.g., from the repo root, run `./build.sh clr+libs -rc release` if working on Libraries on CoreCLR. To find the applicable command, refer to the section [1.2. Baseline Setup](#12-baseline-setup).
219246

220247
- **Testhost Is Missing**
221248

@@ -225,7 +252,7 @@ From the repository root:
225252
that means some of the prerequisites were not built.
226253

227254
- To resolve, build both the appropriate runtime (clr or mono) and the libs as a single command before running tests.
228-
E.g., from the repo root, run `./build.sh clr+libs -rc release` before testing Libraries on CoreCLR. Refer to the section `1.2. Baseline Setup`.
255+
E.g., from the repo root, run `./build.sh clr+libs -rc release` before testing Libraries on CoreCLR. To find the applicable command, refer to the section [1.2. Baseline Setup](#12-baseline-setup).
229256

230257
- **Build Timeout**
231258

@@ -247,3 +274,17 @@ From the repository root:
247274
- Use `build.cmd` instead of `build.sh` on Windows.
248275
- Set PATH: `set PATH=%CD%\.dotnet;%PATH%`
249276
- All other commands are similar unless otherwise noted.
277+
278+
---
279+
280+
### 7.3. References
281+
282+
- [`.editorconfig`](/.editorconfig)
283+
- [Building CoreCLR Guide](/docs/workflow/building/coreclr/README.md)
284+
- [Building and Running CoreCLR Tests](/docs/workflow/testing/coreclr/testing.md)
285+
- [Building Mono](/docs/workflow/building/mono/README.md)
286+
- [Running test suites using Mono](/docs/workflow/testing/mono/testing.md)
287+
- [Build Libraries](/docs/workflow/building/libraries/README.md)
288+
- [Testing Libraries](/docs/workflow/testing/libraries/testing.md)
289+
- [Build libraries for WebAssembly](/docs/workflow/building/libraries/webassembly-instructions.md)
290+
- [Testing Libraries on WebAssembly](/docs/workflow/testing/libraries/testing-wasm.md)

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
88
# See https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent
99
copilot-setup-steps:
10-
runs-on: ubuntu-latest
10+
runs-on: 8-core-ubuntu-latest
1111

1212
permissions:
1313
contents: read

Directory.Build.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
2727
<Import Project="$(RepositoryEngineeringDir)toolAot.targets" />
2828
<Import Project="$(RepositoryEngineeringDir)generators.targets" />
29-
<Import Project="$(RepositoryEngineeringDir)python.targets" />
3029
<Import Project="$(RepositoryEngineeringDir)generatorProjects.targets" Condition="'$(IsGeneratorProject)' == 'true'" />
3130
<Import Project="$(RepositoryEngineeringDir)resolveContract.targets" Condition="'$(IsSourceProject)' == 'true'" />
3231
<Import Project="$(RepositoryEngineeringDir)packaging.targets" Condition="'$(IsPackable)' == 'true' and '$(MSBuildProjectExtension)' != '.pkgproj'" />

docs/coding-guidelines/breaking-change-rules.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ successfully bind to that overload, if simply passing an `int` value. However, i
238238

239239
* Adding a reference type field, a `ref` field, or a field involving a generic type parameter without the `unmanaged` constraint, to a value type that formerly had none of those field kinds. If the value type already contains at least one such field, adding another is non-breaking. This rule applies recursively to new fields that contain value types that may also introduce a new field kind.
240240

241+
* Adding `partial` modifier to an interface method
242+
243+
Roslyn has [a spec violation](https://github.com/dotnet/roslyn/blob/6f6d64494dc75614f14ef1ac66dde3cc8d2d0092/docs/compilers/CSharp/Deviations%20from%20Standard.md#interface-partial-methods) that makes partial interface methods implicitly non-virtual. When you add the `partial` modifier to an interface method that was previously implicitly virtual, be sure to also include the `virtual` modifier to avoid a breaking change.
244+
241245
### Signatures
242246
&#10003; **Allowed**
243247
* Adding `params` to a parameter

docs/tools/illink/data-formats.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,20 +253,6 @@ Entire method body is replaces with `throw` instruction when method is reference
253253
</linker>
254254
```
255255

256-
### Override static field value with a constant
257-
258-
The `initialize` attribute is optional and when not specified the code to set the static field to the value will not be generated.
259-
260-
```xml
261-
<linker>
262-
<assembly fullname="Assembly">
263-
<type fullname="Assembly.A">
264-
<field name="MyNumericField" value="5" initialize="true" />
265-
</type>
266-
</assembly>
267-
</linker>
268-
```
269-
270256
### Remove embedded resources
271257

272258
```xml

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<Uri>https://github.com/dotnet/llvm-project</Uri>
4242
<Sha>da5dd054a531e6fea65643b7e754285b73eab433</Sha>
4343
</Dependency>
44-
<Dependency Name="System.CommandLine" Version="2.0.0-beta5.25260.104">
44+
<Dependency Name="System.CommandLine" Version="2.0.0-beta5.25279.2">
4545
<Uri>https://github.com/dotnet/dotnet</Uri>
4646
<Sha>85778473549347b3e4bad3ea009e9438df7b11bb</Sha>
4747
</Dependency>
@@ -263,7 +263,7 @@
263263
<Uri>https://github.com/dotnet/llvm-project</Uri>
264264
<Sha>da5dd054a531e6fea65643b7e754285b73eab433</Sha>
265265
</Dependency>
266-
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.5.25260.104">
266+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.0-preview.5.25260.104">
267267
<Uri>https://github.com/dotnet/dotnet</Uri>
268268
<Sha>85778473549347b3e4bad3ea009e9438df7b11bb</Sha>
269269
</Dependency>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<!-- NuGet dependencies -->
107107
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
108108
<!-- Installer dependencies -->
109-
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.5.25260.104</MicrosoftNETCoreAppRuntimewinx64Version>
109+
<MicrosoftNETCoreAppRefVersion>10.0.0-preview.5.25260.104</MicrosoftNETCoreAppRefVersion>
110110
<MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion>
111111
<!-- ILAsm dependencies -->
112112
<MicrosoftNETCoreILAsmVersion>10.0.0-preview.5.25260.104</MicrosoftNETCoreILAsmVersion>
@@ -180,7 +180,7 @@
180180
<!-- Not auto-updated. -->
181181
<MicrosoftDiaSymReaderVersion>2.0.0</MicrosoftDiaSymReaderVersion>
182182
<MicrosoftDiaSymReaderNativeVersion>17.10.0-beta1.24272.1</MicrosoftDiaSymReaderNativeVersion>
183-
<SystemCommandLineVersion>2.0.0-beta5.25260.104</SystemCommandLineVersion>
183+
<SystemCommandLineVersion>2.0.0-beta5.25279.2</SystemCommandLineVersion>
184184
<TraceEventVersion>3.1.16</TraceEventVersion>
185185
<NETStandardLibraryRefVersion>2.1.0</NETStandardLibraryRefVersion>
186186
<NetStandardLibraryVersion>2.0.3</NetStandardLibraryVersion>

eng/pipelines/performance/templates/build-perf-sample-apps.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,29 @@ steps:
7878
workingDirectory: $(Build.SourcesDirectory)/artifacts/bin
7979
displayName: clean bindir
8080

81+
# CoreCLR JIT static linking build
82+
- script: make run TARGET_ARCH=arm64 DEPLOY_AND_RUN=false RUNTIME_FLAVOR=CoreCLR STATIC_LINKING=true
83+
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/Android
84+
displayName: Build HelloAndroid sample app RUNTIME_FLAVOR=CoreCLR STATIC_LINKING=true
85+
- task: PublishBuildArtifacts@1
86+
condition: succeededOrFailed()
87+
displayName: 'Publish binlog'
88+
inputs:
89+
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/Android/msbuild.binlog
90+
artifactName: AndroidCoreCLRArm64StaticLinkingBuildLog
91+
- template: /eng/pipelines/common/upload-artifact-step.yml
92+
parameters:
93+
rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/Bundle/bin/HelloAndroid.apk
94+
includeRootFolder: true
95+
displayName: Android Sample App JIT CoreCLR Static Linking
96+
artifactName: AndroidHelloWorldArm64CoreCLRStaticLinking
97+
archiveExtension: '.tar.gz'
98+
archiveType: tar
99+
tarCompression: gz
100+
- script: rm -r -f $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp
101+
workingDirectory: $(Build.SourcesDirectory)/artifacts/bin
102+
displayName: clean bindir
103+
81104
# CoreCLR R2R build
82105
- script: make run TARGET_ARCH=arm64 DEPLOY_AND_RUN=false RUNTIME_FLAVOR=CoreCLR R2R=true
83106
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/Android

eng/pipelines/runtime.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ extends:
531531
- name: timeoutPerTestCollectionInMinutes
532532
value: 180
533533
jobParameters:
534-
timeoutInMinutes: 120
534+
timeoutInMinutes: 180
535535
nameSuffix: NativeAOT
536536
buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false
537537
postBuildSteps:
@@ -614,7 +614,7 @@ extends:
614614
value: 180
615615
jobParameters:
616616
testGroup: innerloop
617-
timeoutInMinutes: 120
617+
timeoutInMinutes: 180
618618
nameSuffix: NativeAOT
619619
buildArgs: -s clr.aot+libs+tools.illink -c $(_BuildConfig) -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false
620620
postBuildSteps:

eng/python.targets

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)