Skip to content

Commit 46ff244

Browse files
author
Dan Moseley
authored
Merge branch 'main' into copilot/fix-wasmtest-on-chrome
2 parents 4f60d94 + 10b20d5 commit 46ff244

194 files changed

Lines changed: 8014 additions & 3908 deletions

File tree

Some content is hidden

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

.github/skills/update-os-coverage/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Before making any changes, confirm the **exact target container tag** exists in
9494
```bash
9595
TARGET_TAG="<exact-image-tag>"
9696
curl -sL https://github.com/dotnet/versions/raw/refs/heads/main/build-info/docker/image-info.dotnet-dotnet-buildtools-prereqs-docker-main.json \
97-
| jq -r --arg tag "$TARGET_TAG" '[.repos[].images[].platforms[].simpleTags[]] | unique | map(select(. == $tag)) | .[]'
97+
| jq -e --arg tag "$TARGET_TAG" 'any(.repos[].images[].platforms[].simpleTags[]; . == $tag)'
9898
```
9999

100100
If the exact tag is **not found in `image-info`**, stop and inform the user. Treat that as authoritative even if a registry lookup appears to work. The image must be created first at [dotnet/dotnet-buildtools-prereqs-docker](https://github.com/dotnet/dotnet-buildtools-prereqs-docker). Check if an open issue or PR already exists, for example:

eng/build.ps1

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,29 @@ function Get-Help() {
135135
Write-Host "For more information, check out https://github.com/dotnet/runtime/blob/main/docs/workflow/README.md"
136136
}
137137

138+
function Check-LongPathSupport() {
139+
$regValue = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -ErrorAction SilentlyContinue
140+
141+
if ($regValue -and $regValue.LongPathsEnabled -eq 1) {
142+
return
143+
}
144+
145+
Write-Host ""
146+
Write-Host "ERROR: Long file paths are not enabled on this system." -ForegroundColor Red
147+
Write-Host "The dotnet/runtime repository requires long path support to build successfully." -ForegroundColor Red
148+
Write-Host ""
149+
Write-Host "Please follow the instructions at:" -ForegroundColor Yellow
150+
Write-Host " docs\workflow\requirements\windows-requirements.md#enable-long-paths" -ForegroundColor Yellow
151+
Write-Host ""
152+
Write-Host "Quick fix:" -ForegroundColor Yellow
153+
Write-Host " 1. Enable long paths in Windows (requires admin):" -ForegroundColor White
154+
Write-Host " https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation" -ForegroundColor White
155+
Write-Host " 2. Enable long paths in Git:" -ForegroundColor White
156+
Write-Host " git config --system core.longpaths true" -ForegroundColor White
157+
Write-Host ""
158+
exit 1
159+
}
160+
138161
if ($help) {
139162
Get-Help
140163
exit 0
@@ -152,6 +175,8 @@ if ($subset -eq 'help') {
152175
exit 0
153176
}
154177

178+
Check-LongPathSupport
179+
155180
# Lower-case the passed in OS string.
156181
if ($os) {
157182
$os = $os.ToLowerInvariant()

eng/native.wasm.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<Project>
22
<Import Project="$(RepositoryEngineeringDir)AcquireEmscriptenSdk.targets" />
33

4-
<ItemGroup>
4+
<!-- These packages provide ICU and timezone data paths for the native build (CMake).
5+
Skip them during app-level relink (IsBrowserWasmProject) since the runtime pack
6+
already includes the pre-built native files, and the NuGet contentFiles (timezone
7+
data, READMEs) would pollute the app's Content items causing VFS/StaticWebAssets
8+
validation failures. -->
9+
<ItemGroup Condition="'$(IsBrowserWasmProject)' != 'true'">
510
<PackageReference Condition="'$(TargetsWasm)' == 'true'" Include="Microsoft.NETCore.Runtime.ICU.Transport" PrivateAssets="all" Version="$(MicrosoftNETCoreRuntimeICUTransportVersion)" GeneratePathProperty="true" />
611
<PackageReference Condition="'$(TargetsWasm)' == 'true'" Include="System.Runtime.TimeZoneData" PrivateAssets="all" Version="$(SystemRuntimeTimeZoneDataVersion)" GeneratePathProperty="true" />
712
</ItemGroup>

eng/pipelines/common/evaluate-default-paths.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ parameters:
6666
src/native/libs/Common/JavaScript/*
6767
src/native/libs/System.Native.Browser/*
6868
src/native/libs/System.Runtime.InteropServices.JavaScript.Native/*
69+
src/native/package.json
70+
src/native/package-lock.json
71+
src/native/tsconfig.json
72+
src/native/.npmrc
73+
src/native/rollup.config*
6974
]
7075
_wasm_chrome: [
7176
eng/testing/bump-chrome-version.proj

eng/pipelines/diagnostics/runtime-diag-job.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ parameters:
3838
disableComponentGovernance: ''
3939
liveRuntimeDir: ''
4040
useCdac: false
41+
noFallback: false
4142
classFilter: ''
4243

4344
jobs:
@@ -89,6 +90,7 @@ jobs:
8990
- _TestArgs: '-test'
9091
- _Cross: ''
9192
- _CdacArgs: ''
93+
- _NoFallbackArgs: ''
9294
- _ClassFilterArgs: ''
9395

9496
- _buildScript: $(Build.SourcesDirectory)$(dir)build$(scriptExt)
@@ -105,6 +107,9 @@ jobs:
105107
- ${{ if eq(parameters.useCdac, 'true') }}:
106108
- _CdacArgs: '-useCdac'
107109

110+
- ${{ if eq(parameters.noFallback, 'true') }}:
111+
- _NoFallbackArgs: '-noFallback'
112+
108113
- ${{ if ne(parameters.classFilter, '') }}:
109114
- _ClassFilterArgs: '-classfilter ${{ parameters.classFilter }}'
110115

@@ -201,6 +206,7 @@ jobs:
201206
-architecture ${{ parameters.archType }}
202207
-privatebuild
203208
$(_CdacArgs)
209+
$(_NoFallbackArgs)
204210
-liveRuntimeDir ${{ parameters.liveRuntimeDir }}
205211
$(_TestArgs)
206212
$(_Cross)

eng/pipelines/runtime-diagnostics.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,60 @@ extends:
144144
displayName: 'Publish Test Results and SOS Logs'
145145
continueOnError: true
146146
condition: failed()
147+
- template: /eng/pipelines/common/platform-matrix.yml
148+
parameters:
149+
jobTemplate: /eng/pipelines/diagnostics/runtime-diag-job.yml
150+
buildConfig: release
151+
platforms:
152+
- windows_x64
153+
# Workaround: microsoft/azure-pipelines-tasks#21871
154+
variables:
155+
- name: AllowPtrToDetectTestRunRetryFiles
156+
value: false
157+
jobParameters:
158+
name: cDAC_no_fallback
159+
useCdac: true
160+
noFallback: true
161+
classFilter: SOS
162+
isOfficialBuild: ${{ variables.isOfficialBuild }}
163+
liveRuntimeDir: $(Build.SourcesDirectory)/artifacts/runtime
164+
timeoutInMinutes: 360
165+
dependsOn:
166+
- build_windows_x64_release_AllSubsets_CoreCLR
167+
preBuildSteps:
168+
- template: /eng/pipelines/common/download-artifact-step.yml
169+
parameters:
170+
artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr
171+
artifactFileName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr$(archiveExtension)
172+
unpackFolder: $(Build.SourcesDirectory)/artifacts/runtime
173+
displayName: 'Runtime Build Artifacts'
174+
postBuildSteps:
175+
- task: PublishTestResults@2
176+
inputs:
177+
testResultsFormat: xUnit
178+
testResultsFiles: '**/*.xml'
179+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults'
180+
testRunTitle: 'Tests $(_PhaseName)'
181+
failTaskOnFailedTests: true
182+
publishRunAttachments: true
183+
mergeTestResults: true
184+
buildConfiguration: $(_BuildConfig)
185+
continueOnError: true
186+
condition: always()
187+
- task: PublishPipelineArtifact@1
188+
inputs:
189+
targetPath: '$(Build.SourcesDirectory)/artifacts/tmp/$(_BuildConfig)/dumps'
190+
artifactName: 'Dumps_cDAC_no_fallback_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)'
191+
displayName: 'Publish Crash Dumps'
192+
continueOnError: true
193+
condition: failed()
194+
- task: PublishPipelineArtifact@1
195+
inputs:
196+
targetPath: '$(Build.SourcesDirectory)/artifacts/TestResults'
197+
artifactName: 'TestResults_cDAC_no_fallback_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_Attempt$(System.JobAttempt)'
198+
displayName: 'Publish Test Results and SOS Logs'
199+
continueOnError: true
200+
condition: failed()
147201
- template: /eng/pipelines/common/platform-matrix.yml
148202
parameters:
149203
jobTemplate: /eng/pipelines/diagnostics/runtime-diag-job.yml

eng/testing/tests.mobile.targets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
</PropertyGroup>
4747

4848
<!-- When trimming non-exe projects, root the whole intermediate assembly.
49-
The SDK settings root only the entry point by default. These targets are used not only for standard
50-
console apps, but also for test projects without an entry point. -->
49+
The SDK no longer creates a TrimmerRootAssembly item for Library projects (see
50+
Microsoft.NET.ILLink.targets), so replace any existing item and create it when
51+
absent to ensure RootMode="all". -->
5152
<Target Name="RootEntireIntermediateAssembly" AfterTargets="PrepareForILLink" Condition="'$(OutputType)' != 'Exe'">
5253
<ItemGroup>
53-
<TrimmerRootAssembly Condition="'%(Identity)' == '$(AssemblyName)'">
54-
<RootMode>all</RootMode>
55-
</TrimmerRootAssembly>
54+
<TrimmerRootAssembly Remove="@(IntermediateAssembly->'%(Filename)')" />
55+
<TrimmerRootAssembly Include="@(IntermediateAssembly->'%(Filename)')" RootMode="all" />
5656
</ItemGroup>
5757
</Target>
5858

src/coreclr/debug/daccess/dacdbiimpl.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3853,31 +3853,6 @@ HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::GetRcwCachedInterfacePointers(VMP
38533853
#endif // FEATURE_COMINTEROP
38543854
}
38553855

3856-
HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::GetCachedWinRTTypesForIIDs(VMPTR_AppDomain vmAppDomain, DacDbiArrayList<GUID> * pIids, OUT DacDbiArrayList<DebuggerIPCE_ExpandedTypeData> * pTypes)
3857-
{
3858-
if (pIids == NULL || pTypes == NULL)
3859-
return E_POINTER;
3860-
3861-
HRESULT hr = S_OK;
3862-
EX_TRY
3863-
{
3864-
pTypes->Alloc(0);
3865-
}
3866-
EX_CATCH_HRESULT(hr);
3867-
return hr;
3868-
}
3869-
3870-
HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::GetCachedWinRTTypes(VMPTR_AppDomain vmAppDomain, OUT DacDbiArrayList<GUID> * piids, OUT DacDbiArrayList<DebuggerIPCE_ExpandedTypeData> * pTypes)
3871-
{
3872-
HRESULT hr = S_OK;
3873-
EX_TRY
3874-
{
3875-
pTypes->Alloc(0);
3876-
}
3877-
EX_CATCH_HRESULT(hr);
3878-
return hr;
3879-
}
3880-
38813856
//-----------------------------------------------------------------------------
38823857
// DacDbiInterfaceImpl::FindField
38833858
// Finds information for a particular class field

src/coreclr/debug/daccess/dacdbiimpl.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,6 @@ class DacDbiInterfaceImpl :
325325
// in the runtime)
326326
HRESULT STDMETHODCALLTYPE GetRcwCachedInterfacePointers(VMPTR_Object vmObject, BOOL bIInspectableOnly, OUT DacDbiArrayList<CORDB_ADDRESS> * pDacItfPtrs);
327327

328-
// retrieves a list of interface types corresponding to the passed in
329-
// list of IIDs. the interface types are retrieved from an app domain
330-
// IID / Type cache, that is updated as new types are loaded. will
331-
// have NULL entries corresponding to unknown IIDs in "iids"
332-
HRESULT STDMETHODCALLTYPE GetCachedWinRTTypesForIIDs(VMPTR_AppDomain vmAppDomain, DacDbiArrayList<GUID> * pIids, OUT DacDbiArrayList<DebuggerIPCE_ExpandedTypeData> * pTypes);
333-
334-
// retrieves the whole app domain cache of IID / Type mappings.
335-
HRESULT STDMETHODCALLTYPE GetCachedWinRTTypes(VMPTR_AppDomain vmAppDomain, OUT DacDbiArrayList<GUID> * piids, OUT DacDbiArrayList<DebuggerIPCE_ExpandedTypeData> * pTypes);
336-
337328
private:
338329
// Helper to enumerate all possible memory ranges help by a loader allocator.
339330
void EnumerateMemRangesForLoaderAllocator(

src/coreclr/debug/inc/dacdbiinterface.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,16 +1788,6 @@ IDacDbiInterface : public IUnknown
17881788
// in the runtime)
17891789
virtual HRESULT STDMETHODCALLTYPE GetRcwCachedInterfacePointers(VMPTR_Object vmObject, BOOL bIInspectableOnly, OUT DacDbiArrayList<CORDB_ADDRESS> * pDacItfPtrs) = 0;
17901790

1791-
// retrieves a list of interface types corresponding to the passed in
1792-
// list of IIDs. the interface types are retrieved from an app domain
1793-
// IID / Type cache, that is updated as new types are loaded. will
1794-
// have NULL entries corresponding to unknown IIDs in "iids"
1795-
virtual HRESULT STDMETHODCALLTYPE GetCachedWinRTTypesForIIDs(VMPTR_AppDomain vmAppDomain, DacDbiArrayList<GUID> * pIids, OUT DacDbiArrayList<DebuggerIPCE_ExpandedTypeData> * pTypes) = 0;
1796-
1797-
// retrieves the whole app domain cache of IID / Type mappings.
1798-
virtual HRESULT STDMETHODCALLTYPE GetCachedWinRTTypes(VMPTR_AppDomain vmAppDomain, OUT DacDbiArrayList<GUID> * piids, OUT DacDbiArrayList<DebuggerIPCE_ExpandedTypeData> * pTypes) = 0;
1799-
1800-
18011791
// ----------------------------------------------------------------------------
18021792
// functions to get information about reference/handle referents for ICDValue
18031793
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)