Skip to content
Merged
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
10 changes: 9 additions & 1 deletion .github/workflows/coyote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@ jobs:
dll="bin/Release/net8.0/Wolfgang.Etl.Abstractions.Tests.Concurrency.dll"
methods=(
Concurrent_item_count_increments_never_lose_an_update
Dispose_racing_enumeration_never_deadlocks
# Dispose_racing_enumeration_never_deadlocks is DISABLED (#364).
# Coyote 1.7.11 throws a NullReferenceException inside its own
# CoyoteRuntime.IsTaskUncontrolled when it meets the
# ConfiguredCancelableAsyncEnumerable awaiter that the ConfigureAwait(false)
# fix (#363) introduced in ExtractorBase.ExtractWithResetAsync. It is an
# instrumentation crash, not a race we found: "Found 1 bug" on iteration #1,
# 1 execution path explored, 0.096 sec. Coyote is dormant (1.7.11 is the
# newest on nuget.org; last upstream commit 2024-12-11), so there is no
# version to upgrade to. Re-enable via #364.
)
for m in "${methods[@]}"; do
echo "::group::coyote test $m ($iterations iterations)"
Expand Down
54 changes: 23 additions & 31 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,45 +42,37 @@ jobs:
Write-Host "Expected version: $tagVersion" -ForegroundColor Cyan
Write-Host ""

$srcCsprojs = @(Get-ChildItem -Path './src' -Recurse -Filter '*.csproj' -ErrorAction SilentlyContinue)
if ($srcCsprojs.Count -eq 0) {
Write-Warning "No src csprojs found - skipping version validation"
exit 0
# The four packages are lockstep-versioned; <Version> is the single source of truth in
# Directory.Build.props (no per-csproj <Version>). Read it there.
$propsPath = './Directory.Build.props'
if (-not (Test-Path $propsPath)) {
Write-Error "Directory.Build.props not found - cannot resolve the package version"
exit 1
}

# Collect <Version> and <PackageVersion> values from every src csproj
$found = @()
foreach ($proj in $srcCsprojs) {
try {
[xml]$xml = Get-Content $proj.FullName -Raw
$nodes = $xml.SelectNodes('//Version | //PackageVersion')
foreach ($node in $nodes) {
$v = $node.InnerText.Trim()
if ($v) {
$found += [pscustomobject]@{ Project = $proj.Name; Version = $v }
}
}
} catch {
Write-Warning "Failed to parse $($proj.Name): $($_.Exception.Message)"
}
}
[xml]$props = Get-Content $propsPath -Raw
# Scope to PropertyGroup-level <Version> (the package version) — NOT a
# <PackageReference><Version> child element — and require exactly one distinct value.
$versions = @($props.SelectNodes('/Project/PropertyGroup/Version') | ForEach-Object { $_.InnerText.Trim() } | Where-Object { $_ } | Sort-Object -Unique)

Write-Host "Versions found in src csprojs:" -ForegroundColor Cyan
foreach ($f in $found) {
Write-Host " $($f.Project): $($f.Version)" -ForegroundColor DarkGray
if ($versions.Count -eq 0) {
Write-Error "No <Version> property found in Directory.Build.props"
exit 1
}
Write-Host ""

if ($found.Count -eq 0) {
Write-Error "No <Version> or <PackageVersion> found in any src csproj"
if ($versions.Count -gt 1) {
Write-Error "Multiple distinct <Version> values in Directory.Build.props: $($versions -join ', '). There must be exactly one."
exit 1
}

if ($found.Version -contains $tagVersion) {
Write-Host "Release tag matches at least one src csproj version" -ForegroundColor Green
$version = $versions[0]

Write-Host "Repository version (Directory.Build.props): $version" -ForegroundColor Cyan
Write-Host ""

if ($version -eq $tagVersion) {
Write-Host "Release tag matches the repository version" -ForegroundColor Green
} else {
$allVersions = ($found.Version | Sort-Object -Unique) -join ', '
Write-Error "Release tag '$tagName' (version '$tagVersion') does not match any src csproj version. Found: $allVersions. Bump the csproj <Version> or correct the release tag before re-running."
Write-Error "Release tag '$tagName' (version '$tagVersion') does not match the repository version '$version'. Bump <Version> in Directory.Build.props or correct the release tag before re-running."
exit 1
}

Expand Down
18 changes: 18 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,27 @@
(Description, PackageTags, PackageProjectUrl, RepositoryUrl,
PackageLicenseExpression, PackageReadmeFile) stay in each src
csproj where they are repo-specific. -->
<!-- Single source of truth for the package version. All four packages are lockstep-versioned
with the repository; bump this one value per release. (Per-csproj <Version> is intentionally
absent so the versions can never drift out of sync.) -->
<Version>0.22.0</Version>
<!-- AssemblyVersion is pinned to a fixed binding-stability baseline so consumers do not need to
recompile / add binding redirects on every minor/patch bump — bump only on a deliberate
breaking API change. FileVersion (and the auto-derived InformationalVersion) carry the actual
release version. Centralized here so all four packages stay in lockstep. -->
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>$([System.Text.RegularExpressions.Regex]::Replace("$(Version)", "[-+].*$", "")).0</FileVersion>
<Authors>Chris Wolfgang</Authors>
<Company>Chris Wolfgang</Company>
<Copyright>Copyright (c) Chris Wolfgang</Copyright>
<!-- Repo-uniform now that all four packages ship from this repo. RepositoryUrl is intentionally
NOT set here — SourceLink derives it from the git remote via PublishRepositoryUrl below. -->
<PackageProjectUrl>https://github.com/Chris-Wolfgang/ETL-Abstractions</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<!-- MIT does not require explicit acceptance; standardized to False for all packages. -->
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<SignAssembly>False</SignAssembly>
<LangVersion>latest</LangVersion>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand Down
Loading