Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/skills/pr-description/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ Reviewers can already see the Files tab, the commit log, and the issue thread. S

## Rules

Rules 1, 2, 4, 5 are defaults; if the user insists, push back once then comply. Rule 3 is non-negotiable — `-b "..."` ships broken markdown (see PR #19866).
Rules 1, 2, 4, 5, 6 are defaults; if the user insists, push back once then comply. Rule 3 is non-negotiable — `-b "..."` ships broken markdown (see PR #19866).

1. **No change inventory.** No file/module/method/test lists. No `## Changes`/`## Implementation` section. Mention an identifier only when it *is* the user-visible behavior. Whatever the reader already has (Files tab for PRs, commit log for follow-up comments, issue history for issue edits) — don't re-list it.
2. **No LLM slop, no justification scaffolding.** No emoji headers, no "TL;DR" above a 3-line body, no Motivation/Background/Approach/Testing sections, no re-stating the title or the comment you're replying to. No "matching the X norm", no "preventing the Y failure (PR #ZZZZ)", no stats, no links to past PRs as proof. The diff is the proof.
3. **Body via `--body-file`, built without shell expansion.** Write the file with your file-creation/edit tool (it writes bytes verbatim — no `$`/backtick evaluation, no delimiter collisions, OS-agnostic). Never `-b "..."` / `--body "..."` — backticks and `$` get shell-evaluated and the render breaks. If you build the file in a shell, use a pwsh verbatim here-string `@'...'@` (cross-platform; single-quoted is mandatory). Applies to `gh pr create/edit/comment/review`, `gh issue create/edit/comment`.
4. **`Fixes #N` to close issues.** Use only when the PR actually closes #N (auto-closes on merge). It is the highest-value line in most PR bodies — never omit it when valid. No "Related to" / speculative links. Preserve existing trailers (`Co-authored-by:`, `Signed-off-by:`, `Reverts #N`); don't invent them.
5. **Title:** imperative, ≤72 chars, no trailing period, no `fix:`/`feat:` prefix. Name the behavior, not the file. A specific title lets the body shrink to `Fixes #N` + one sentence.
6. **No hard-wrapped prose.** Write each paragraph as one unbroken line and let GitHub's renderer wrap it — blank lines separate paragraphs, and that's the only break you author. Manual mid-sentence line breaks (wrapping at a fixed column) are a machine tell and render raggedly across window widths.

## PR-body shapes (pick the smallest that carries the signal)

Expand All @@ -28,16 +29,14 @@ Update .NET SDK from 10.0.202 to 10.0.204.
~~~
Fixes #18009

Wrong colorization when a qualified type name with generic parameters
is used in a static member access expression.
Wrong colorization when a qualified type name with generic parameters is used in a static member access expression.
~~~

**Issue link + 1-sentence why** — the most common non-trivial shape:
~~~
Fixes #19751

`--refout` MVIDs were unstable because hashing relied on per-process
string randomization. Switched to a deterministic hash.
`--refout` MVIDs were unstable because hashing relied on per-process string randomization. Switched to a deterministic hash.
~~~

**Before/After code block** — when prose loses information; ≤15 lines, language tag:
Expand Down Expand Up @@ -73,8 +72,7 @@ Show the title + body (or comment text) in chat first. **Do not run `gh` until t

```powershell
@'
Fix false-positive FS3261 when nullness narrowing leaks across iterations
of seq/list/array comprehensions.
Fix false-positive FS3261 when nullness narrowing leaks across iterations of seq/list/array comprehensions.

Fixes #19644
'@ | Set-Content -NoNewline pr-body.md
Expand Down
2 changes: 1 addition & 1 deletion eng/TargetFrameworks.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<PropertyGroup>
<!-- Default target framework for F# products - only set if not already provided -->
<FSharpNetCoreProductTargetFramework Condition="'$(FSharpNetCoreProductTargetFramework)' == ''">net10.0</FSharpNetCoreProductTargetFramework>
<FSharpNetCoreProductTargetFramework Condition="'$(FSharpNetCoreProductTargetFramework)' == ''">net11.0</FSharpNetCoreProductTargetFramework>

<!-- Derive major version by stripping 'net' prefix and '.0' suffix (e.g., net10.0 -> 10) -->
<FSharpNetCoreProductMajorVersion>$([System.Text.RegularExpressions.Regex]::Replace('$(FSharpNetCoreProductTargetFramework)', '^net(\d+)\.0$', '$1'))</FSharpNetCoreProductMajorVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props
<Project>
<PropertyGroup>
<!-- dotnet-arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26371.2</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.26369.1</MicrosoftDotNetArcadeSdkPackageVersion>
<!-- dotnet-msbuild dependencies -->
<MicrosoftBuildPackageVersion>18.10.0-1.26370.18</MicrosoftBuildPackageVersion>
<MicrosoftBuildFrameworkPackageVersion>18.10.0-1.26370.18</MicrosoftBuildFrameworkPackageVersion>
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26371.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26369.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>c38c50f518aac7fac47ca488c42c7176d40e695c</Sha>
<Sha>09bc8c946f4c4ae5d031c8875b85a6b8f1876b93</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.26318.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<!-- Making diff way too large, update separately later. e.g. to 6.0.0-rtm.21518.12 and 9.0.0-rc.2.24462.10 or via darc -->
<MicrosoftNETCoreILDAsmVersion>5.0.0-preview.7.20364.11</MicrosoftNETCoreILDAsmVersion>
<MicrosoftNETCoreILAsmVersion>5.0.0-preview.7.20364.11</MicrosoftNETCoreILAsmVersion>
<MicrosoftTestPlatformVersion>17.14.1</MicrosoftTestPlatformVersion>
<MicrosoftTestPlatformVersion>18.0.1</MicrosoftTestPlatformVersion>
<MicrosoftTestingExtensionsHangDumpVersion>2.0.2</MicrosoftTestingExtensionsHangDumpVersion>
<NewtonsoftJsonVersion>13.0.4</NewtonsoftJsonVersion>
<XunitVersion>3.2.2</XunitVersion>
Expand Down
5 changes: 5 additions & 0 deletions eng/common/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# `eng/common`

Files under `eng/common` come from [Arcade](https://github.com/dotnet/arcade).
Edits in `eng/common` will be overwritten by automation unless the changes are made directly in the Arcade repository.
For more information, see the [Arcade documentation](https://github.com/dotnet/arcade/tree/main/Documentation).
28 changes: 12 additions & 16 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly,
# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present.
# In addition, this script also enables disabled internal Maestro (darc-int*) feeds.
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
# disabled internal Maestro (darc-int*) feeds.
#
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
Expand All @@ -14,7 +13,11 @@
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
# Token: $(InternalFeedToken)
#
# Note: This logic is abstracted into enable-internal-sources.yml, which uses
# NuGetAuthenticate or a WIF-backed service connection. Prefer that template
# over calling this script directly.
#
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
# This ensures that:
Expand All @@ -33,6 +36,11 @@ $ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# This script only consumes helper functions from tools.ps1 to configure NuGet feeds.
# Skip importing configure-toolset.ps1 so that repo-specific toolset setup (e.g. acquiring
# a bootstrap SDK) is not triggered as a side effect of feed configuration.
$disableConfigureToolsetImport = $true

. $PSScriptRoot\tools.ps1

# Adds or enables the package source with the given name
Expand Down Expand Up @@ -174,16 +182,4 @@ foreach ($dotnetVersion in $dotnetVersions) {
}
}

# Check for dotnet-eng and add dotnet-eng-internal if present
$dotnetEngSource = $sources.SelectSingleNode("add[@key='dotnet-eng']")
if ($dotnetEngSource -ne $null) {
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-eng-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
}

# Check for dotnet-tools and add dotnet-tools-internal if present
$dotnetToolsSource = $sources.SelectSingleNode("add[@key='dotnet-tools']")
if ($dotnetToolsSource -ne $null) {
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-tools-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
}

$doc.Save($filename)
22 changes: 7 additions & 15 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env bash

# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly,
# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present.
# In addition, this script also enables disabled internal Maestro (darc-int*) feeds.
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
# disabled internal Maestro (darc-int*) feeds.
#
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
Expand Down Expand Up @@ -41,6 +40,11 @@ while [[ -h "$source" ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

# This script only consumes helper functions from tools.sh to configure NuGet feeds.
# Skip importing configure-toolset.sh so that repo-specific toolset setup (e.g. acquiring
# a bootstrap SDK) is not triggered as a side effect of feed configuration.
disable_configure_toolset_import=1

. "$scriptroot/tools.sh"

if [ ! -f "$ConfigFile" ]; then
Expand Down Expand Up @@ -174,18 +178,6 @@ for DotNetVersion in ${DotNetVersions[@]} ; do
fi
done

# Check for dotnet-eng and add dotnet-eng-internal if present
grep -i "<add key=\"dotnet-eng\"" $ConfigFile > /dev/null
if [ "$?" == "0" ]; then
AddOrEnablePackageSource "dotnet-eng-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$FeedSuffix"
fi

# Check for dotnet-tools and add dotnet-tools-internal if present
grep -i "<add key=\"dotnet-tools\"" $ConfigFile > /dev/null
if [ "$?" == "0" ]; then
AddOrEnablePackageSource "dotnet-tools-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$FeedSuffix"
fi

# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
Expand Down
30 changes: 28 additions & 2 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Param(
[string][Alias('v')]$verbosity = "minimal",
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
[string] $warnNotAsError = '',
[bool] $nodeReuse = $true,
[switch] $buildCheck = $false,
[switch][Alias('r')]$restore,
Expand All @@ -22,7 +23,9 @@ Param(
[switch] $clean,
[switch][Alias('pb')]$productBuild,
[switch]$fromVMR,
[switch]$disablePipelineSetResult,
[switch][Alias('bl')]$binaryLog,
[string][Alias('bln')]$binaryLogName = '',
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
[switch] $prepareMachine,
Expand All @@ -45,6 +48,7 @@ function Print-Usage() {
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
Write-Host " -binaryLog Output binary log (short: -bl)"
Write-Host " -binaryLogName <value> Binary log file name or path; implies -binaryLog (short: -bln)"
Write-Host " -help Print help and exit"
Write-Host ""

Expand All @@ -70,12 +74,14 @@ function Print-Usage() {
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host " -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
Write-Host " -buildCheck Sets /check msbuild parameter"
Write-Host " -fromVMR Set when building from within the VMR"
Write-Host " -disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand All @@ -100,7 +106,19 @@ function Build {
$toolsetBuildProj = InitializeToolset
InitializeCustomToolset

$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
$bl = ''
if ($binaryLog) {
$binaryLogPath = if ([string]::IsNullOrEmpty($binaryLogName)) {
Join-Path $LogDir 'Build.binlog'
} elseif ([System.IO.Path]::IsPathRooted($binaryLogName)) {
$binaryLogName
} else {
Join-Path $LogDir $binaryLogName
}

Create-Directory (Split-Path -Parent $binaryLogPath)
$bl = '/bl:' + $binaryLogPath
}
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
$check = if ($buildCheck) { '/check' } else { '' }

Expand Down Expand Up @@ -157,7 +175,15 @@ try {
if (-not $excludeCIBinarylog) {
$binaryLog = $true
}
$nodeReuse = $false
# Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
if ($env:MSBUILD_NODEREUSE_ENABLED -ne "1") {
$nodeReuse = $false
}
}

if (-not [string]::IsNullOrEmpty($binaryLogName)) {
$binaryLog = $true
}

if ($nativeToolsOnMachine) {
Expand Down
39 changes: 36 additions & 3 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ usage()
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
echo " --binaryLogName <value> Binary log file name or path; implies --binaryLog (short: -bln)"
echo " --help Print help and exit (short: -h)"
echo ""

Expand All @@ -39,11 +40,14 @@ usage()
echo " --projects <value> Project or solution file(s) to build"
echo " --ci Set when running on CI server"
echo " --excludeCIBinarylog Don't output binary log (short: -nobl)"
echo " --pipelinesLog Promote msbuild errors/warnings to Azure Pipelines timeline issues; defaults to on in CI (short: -pl)"
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo " --disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails"
echo ""
echo "Command line arguments not listed above are passed thru to msbuild."
echo "Arguments can also be passed in with a single hyphen."
Expand All @@ -66,6 +70,7 @@ build=false
source_build=false
product_build=false
from_vmr=false
disable_pipeline_set_result=false
rebuild=false
test=false
integration_test=false
Expand All @@ -78,9 +83,11 @@ ci=false
clean=false

warn_as_error=true
warn_not_as_error=''
node_reuse=true
build_check=false
binary_log=false
binary_log_name=''
exclude_ci_binary_log=false
pipelines_log=false

Expand All @@ -92,7 +99,7 @@ runtime_source_feed=''
runtime_source_feed_key=''

properties=()
while [[ $# > 0 ]]; do
while [[ $# -gt 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-help|-h)
Expand All @@ -113,6 +120,11 @@ while [[ $# > 0 ]]; do
-binarylog|-bl)
binary_log=true
;;
-binarylogname|-bln)
binary_log=true
binary_log_name=$2
shift
;;
-excludecibinarylog|-nobl)
exclude_ci_binary_log=true
;;
Expand Down Expand Up @@ -147,6 +159,9 @@ while [[ $# > 0 ]]; do
-fromvmr|-from-vmr)
from_vmr=true
;;
-disablepipelinesetresult|-disable-pipeline-set-result)
disable_pipeline_set_result=true
;;
-test|-t)
test=true
;;
Expand Down Expand Up @@ -176,6 +191,10 @@ while [[ $# > 0 ]]; do
warn_as_error=$2
shift
;;
-warnnotaserror)
warn_not_as_error=$2
shift
;;
-nodereuse)
node_reuse=$2
shift
Expand Down Expand Up @@ -205,7 +224,11 @@ fi

if [[ "$ci" == true ]]; then
pipelines_log=true
node_reuse=false
# Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
if [[ "${MSBUILD_NODEREUSE_ENABLED:-}" != "1" ]]; then
node_reuse=false
fi
if [[ "$exclude_ci_binary_log" == false ]]; then
binary_log=true
fi
Expand All @@ -231,7 +254,17 @@ function Build {

local bl=""
if [[ "$binary_log" == true ]]; then
bl="/bl:\"$log_dir/Build.binlog\""
local binary_log_path=""
if [[ -z "$binary_log_name" ]]; then
binary_log_path="$log_dir/Build.binlog"
elif [[ "$binary_log_name" = /* ]]; then
binary_log_path="$binary_log_name"
else
binary_log_path="$log_dir/$binary_log_name"
fi

mkdir -p "$(dirname "$binary_log_path")"
bl="/bl:\"$binary_log_path\""
fi

local check=""
Expand Down
Loading
Loading