Skip to content
Closed
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
44 changes: 0 additions & 44 deletions .github/workflows/freeze-doctor-contract.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,9 @@ pr-comments*.md
# run build/ci/watch-for-hung-bloom.ps1 locally). Never meant to be committed.
bloom-diagnostics/
bloom-watchdog/

# Temporary, while BloomBooks.FreezeDoctor.Protocol is not published:
# build/pack-freeze-doctor-protocol.ps1 drops the package here and the root NuGet.Config restores it
# from here. See BL-16719.
localpackages/*.nupkg
localpackages/*.snupkg
26 changes: 26 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
TEMPORARY, AND ONLY ON THIS BRANCH.

BloomBooks.FreezeDoctor.Protocol is not published anywhere yet - deliberately, because a push to
nuget.org cannot be undone and we want to review this shape first. So it is restored from a local
folder, which you populate from a clone of the Doctor's repo:

build/pack-freeze-doctor-protocol.ps1

When the package is published for real, this file and that script both go away: it will come from
nuget.org like every other package Bloom uses, published and then unlisted, exactly as
BloomBooks.Velopack already is. See BL-16719.

Note: `<clear />` is deliberately absent, so nuget.org and any machine-level sources still apply -
Bloom restores 53 other packages from them. This only ADDS a source.

Note also that this lives at the repository root rather than in .nuget/. Modern NuGet walks up the
directory tree looking for NuGet.Config and does not read the legacy .nuget/ location, so the
existing .nuget/NuGet.Config is left alone; it is not where a new source would take effect.
-->
<configuration>
<packageSources>
<add key="local-freeze-doctor-protocol" value="localpackages" />
</packageSources>
</configuration>
8 changes: 0 additions & 8 deletions build/check-csharp-robustfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ if [ -s $filesToCheck ]; then
case "$file" in
src/BloomExe/RobustFileIO.cs) continue;;
src/BloomTests/*) continue;;
# The Freeze Doctor contract files are copies of files in BloomBooks/bloom-freeze-doctor and must
# stay byte-identical to them apart from the namespace, so they cannot use RobustFile - it does not
# exist in that repository. Exempting them is safe rather than merely convenient: every call in them
# is a best-effort diagnostic write already wrapped in a catch-everything, and the failure they would
# otherwise retry through simply means "no session file this time", which the callers are built to
# tolerate. Nothing a user's work depends on passes through these files.
src/BloomExe/FreezeDoctor/DoctorChannel.cs) continue;;
src/BloomExe/FreezeDoctor/DoctorSession.cs) continue;;
esac
if awk '
# Flag ordinary banned file APIs directly.
Expand Down
176 changes: 0 additions & 176 deletions build/check-freeze-doctor-contract.sh

This file was deleted.

46 changes: 46 additions & 0 deletions build/pack-freeze-doctor-protocol.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Builds BloomBooks.FreezeDoctor.Protocol from a clone of the Doctor's repo into ./localpackages, so
# this branch can be built before the package is published anywhere.
#
# TEMPORARY. This exists only because nothing is published yet: a push to nuget.org cannot be undone,
# so we wanted to review the shape of the change first. When the package is published for real, delete
# this script, ./localpackages, and the NuGet.Config at the repository root. See BL-16719.

$ErrorActionPreference = "Stop"

$repoRoot = Split-Path -Parent $PSScriptRoot
$output = Join-Path $repoRoot "localpackages"

# Where the Doctor's repo is. Beside this one by default, which is how our checkouts are usually laid
# out; override with BLOOM_FREEZE_DOCTOR_REPO if yours is somewhere else.
$doctorRepo = if ($env:BLOOM_FREEZE_DOCTOR_REPO) {
$env:BLOOM_FREEZE_DOCTOR_REPO
} else {
Join-Path (Split-Path -Parent $repoRoot) "bloom-freeze-doctor"
}

$project = Join-Path $doctorRepo "src\BloomBooks.FreezeDoctor.Protocol\BloomBooks.FreezeDoctor.Protocol.csproj"

if (-not (Test-Path $project)) {
Write-Host "Could not find the protocol project at:" -ForegroundColor Yellow
Write-Host " $project"
Write-Host ""
Write-Host "Clone it beside this repository:"
Write-Host " git clone https://github.com/BloomBooks/bloom-freeze-doctor"
Write-Host ""
Write-Host "or point BLOOM_FREEZE_DOCTOR_REPO at an existing clone. Note that the protocol project"
Write-Host "only exists on that repo's contract-package branch until it is merged."
exit 1
}

New-Item -ItemType Directory -Force -Path $output | Out-Null

Write-Host "Packing $project"
Write-Host " to $output"
dotnet pack $project --configuration Release --output $output
Comment thread
JohnThomson marked this conversation as resolved.
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

Write-Host ""
Write-Host "Done. Now build Bloom as usual; it will restore the package from ./localpackages."
Write-Host "If you have built this branch before, you may need to clear the cached copy first:"
Write-Host " dotnet nuget locals http-cache --clear"
Write-Host " Remove-Item -Recurse -Force ~/.nuget/packages/bloombooks.freezedoctor.protocol"
1 change: 1 addition & 0 deletions localpackages/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Keeps this folder present so NuGet does not complain about a missing source before you run build/pack-freeze-doctor-protocol.ps1. Temporary; see the NuGet.Config at the repo root.
8 changes: 8 additions & 0 deletions src/BloomExe/BloomExe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="AWSSDK.Core" Version="3.5.1.32" />
<!--
The protocol Bloom and the Bloom Freeze Doctor share: the shared-memory health page, the
session file, and the named events. This used to be three files copied into this repo by
hand, 750 lines of them, kept in step by a drift check because they had already drifted.
One package means one definition of the wire format instead of two.
Source: https://github.com/BloomBooks/bloom-freeze-doctor
-->
<PackageReference Include="BloomBooks.FreezeDoctor.Protocol" Version="0.3.1-alpha" />
<PackageReference Include="AWSSDK.S3" Version="3.5.3.10" />
<PackageReference Include="CairoSharp-signed" Version="3.22.24.37" />
<PackageReference Include="CommandLineParser" Version="2.8.0" />
Expand Down
Loading