-
-
Notifications
You must be signed in to change notification settings - Fork 19
Reference the Freeze Doctor contract as a package instead of copying it (BL-16719) #8219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
24b8740
Reference the Freeze Doctor contract as a package instead of copying …
JohnThomson d9e9832
Rename the shared protocol to BloomBooks.FreezeDoctor.Protocol (BL-16…
JohnThomson e97a5c8
Move up to protocol 0.2.0-alpha, and pin the layout by value (BL-16719)
JohnThomson 4eb7463
Detect a debugger attached to a running Bloom, and tidy two things (B…
JohnThomson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| 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" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.