Skip to content

Commit a25007c

Browse files
committed
use standard released Xantham
1 parent dac4f8a commit a25007c

8 files changed

Lines changed: 39 additions & 70 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/setup-dotnet@v6
2929
with:
3030
global-json-file: global.json
31-
- name: Check public Fable support helpers
31+
- name: Check released Fable binding support
3232
run: dotnet run --project tools/NuGetRelease -- support
3333
- name: Retain support verification evidence
3434
if: always()

‎config/nuget-release.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"projectUrl": "https://fsprojects.github.io/FSharp.CloudEdge/",
66
"authors": "FSharp.CloudEdge Contributors",
77
"publicDependencies": {
8-
"Xantham.Fable.Core": "0.1.1",
9-
"Xantham.Fable.Core.TS": "0.1.1"
8+
"Xantham.Fable.Core": "0.1.0",
9+
"Xantham.Fable.Core.TS": "0.1.0"
1010
}
1111
}

‎docs/nuget-release.md‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,13 @@ FSharp.CloudEdge's first release targets **0.1.0** for the 47 projects selected
44

55
NuGet account ownership and publishing authorization are setup tasks independent of GitHub repository administration. This workflow uses **NuGet Trusted Publishing** with GitHub OIDC. GitHub obtains temporary publishing credentials for each run.
66

7-
## Current release blocker
7+
## Release dependencies and validation
88

9-
The public `Xantham.Fable.Core` and `Xantham.Fable.Core.TS` 0.1.0 packages omit their `fable/` source assets. A consumer of `Xantham.Fable.Core` builds successfully with .NET but fails during Fable compilation of `TypeKeyOf.create` with `Cannot find inline member: XanthamFableCore.TypeKeyOf_create`. Erased binding examples can still compile, so those alone do not establish that the support package works.
9+
The release uses the published **0.1.0** versions of `Xantham.Fable.Core` and `Xantham.Fable.Core.TS` from nuget.org. `publicDependencies` in `config/nuget-release.json` records those versions. Publishing CloudEdge does not require publishing or modifying Xantham.
1010

11-
Reproduce using only public support dependencies:
11+
Release validation builds the 19 site example projects against the candidate CloudEdge packages and public external dependencies, then compiles the Fable examples and checks the site's code snippets. Isolated package caches and resolved-package reports make those checks reproducible. The intended first CloudEdge release remains **0.1.0** until its packages have been published successfully.
1212

13-
```bash
14-
dotnet run --project tools/NuGetRelease -- support
15-
```
16-
17-
The probe uses `tests/SupportPackage/Smoke.fs` and `UpstreamHelpers.fs`. Its staged project, isolated package cache, and logs are under `artifacts/nuget-release/0.1.0/public-support/`. The release workflow requires this check to pass before publishing.
18-
19-
The upstream packaging correction includes the project and source assets required by [Fable library packaging](https://fable.io/docs/your-fable-project/author-a-fable-library.html). `publicDependencies` in `config/nuget-release.json` now selects **0.1.1** for both support packages. Locally packed corrected packages pass the helper compilation probe; the upstream maintainer still needs to publish them before the public check can pass. Existing NuGet versions cannot be replaced. CloudEdge's intended first release remains 0.1.0.
20-
21-
To test an upstream packaging fix before publication, pass `--support-feed /absolute/path/to/packages` to `support`, `pack`, and `examples --fable`. These commands map the two Xantham package IDs to that explicit local feed and use isolated caches. This is local evidence only: the GitHub workflow uses public support packages, and `examples --public` rejects a local support feed.
13+
The `support` check restores both public Xantham packages, compiles `tests/SupportPackage/Smoke.fs` with .NET and Fable, and executes its key-value and indexer checks in JavaScript. This covers the support bindings used by CloudEdge; upstream inline helper functions are outside this release gate.
2214

2315
## Restore account access
2416

@@ -64,15 +56,15 @@ The job has `id-token: write` permission and calls `NuGet/login@v1` with `user:
6456

6557
Either authorized GitHub maintainer can run this shared workflow. NuGet checks its configured policy, not whether the triggering GitHub actor has the same NuGet username. Shayan's NuGet organization membership additionally gives him package-management access and the ability to establish his own publishing policy. Organization membership associated with an organization-owned policy must remain active.
6658

67-
If NuGet shows a seven-day activation window, complete a successful publish during that window or restart it with **Activate for 7 days** when ready. The temporary policy becomes permanently active after successful publication supplies the repository identity. The current upstream release blocker should be resolved before publishing; the activation window can be restarted. [Policy activation](https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing#policies-pending-full-activation).
59+
If NuGet shows a seven-day activation window, complete a successful publish during that window or restart it with **Activate for 7 days** when ready. The temporary policy becomes permanently active after successful publication supplies the repository identity. [Policy activation](https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing#policies-pending-full-activation).
6860

6961
## Candidate package preparation
7062

7163
The F# release tool reads the selected solution, orders packages by dependency, and stages clean projects from checked-in source. Generator-only tools and the other unselected projects under `src/` are excluded. Staging leaves the contributor projects and their local generator pins unchanged.
7264

7365
`config/nuget-release.json` pins the release and public support dependency versions. Release consumers must not restore `0.1.0-local.*` dependencies. Candidate packages contain license and README metadata; Fable packages also contain their project and source files under `fable/`.
7466

75-
Sample projects use `0.1.*` so they can adopt stable patches. Published CloudEdge dependencies permit `[0.1.0,0.2.0)`; Xantham support dependencies permit `[0.1.1,0.2.0)`. Release validation replaces sample floats with exact candidate references and pins both support packages to the configured versions. Each consumer's `resolved-packages/*.json` report records the actual dependency versions and is retained in the workflow artifact.
67+
Sample projects use `0.1.*` so they can adopt stable patches. Published CloudEdge and Xantham support dependencies permit `[0.1.0,0.2.0)`. Release validation replaces sample floats with exact candidate references and pins both support packages to the configured public versions. Each consumer's `resolved-packages/*.json` report records the actual dependency versions and is retained in the workflow artifact.
7668

7769
From the repository root:
7870

@@ -90,15 +82,15 @@ The pack step compiles the large shared API assembly and can take several minute
9082

9183
Outputs are under `artifacts/nuget-release/0.1.0`. `pack-logs/` contains the generated solutions, text logs, and MSBuild binary logs. `manifest.json` records package hashes and dependency order. Consumer validation stages all 19 site projects with package references only, uses a fresh package cache, builds them, and compiles Worker examples through Fable. Logs and partial results remain available if a check fails. This validates packaging and compilation, not hosted Cloudflare service behavior.
9284

93-
Inspect the README, license, dependency versions, source assets, and emitted imports before publishing. The Xantham support packages are owned upstream; use their public packages and report reproducible compatibility failures to their maintainer instead of publishing replacements under those IDs.
85+
Inspect the README, license, dependency versions, source assets, and emitted imports before publishing. Every CloudEdge candidate includes a README identifying its package and version, with links to the documentation and source and a brief note on Fable or .NET consumption.
9486

9587
## Publish and verify the public feed
9688

9789
Run the **NuGet** workflow on `main` with **publish disabled** first. It builds candidates, checks consumers, and uploads the packages and verification evidence as an artifact. Fix failures before requesting the actual release.
9890

9991
After committing and merging fixes into `main`, use **Actions → NuGet → Run workflow**, choose `main`, and leave **publish** unchecked. The equivalent command is `gh workflow run publish.yml --ref main -f publish=false`. Here `publish.yml` is the workflow filename and `-f publish=false` supplies its boolean input. Rerunning the old tag's job uses the old commit; dispatching on `main` picks up the merged fixes without changing the package version or moving the tag. Enable **publish** only when ready to upload.
10092

101-
GitHub runs the public support-helper probe in a separate job alongside package validation, so upstream failures appear early. The publication job requires both jobs to succeed. Package compilation uses two MSBuild processes on the standard runner; uploads remain ordered by dependency.
93+
GitHub runs the public support binding check alongside candidate package and consumer validation. The publication job requires both jobs to succeed. Package compilation uses two MSBuild processes on the standard runner; uploads remain ordered by dependency.
10294

10395
When account ownership, the Trusted Publishing policy, and candidate checks are complete, push the release tag **`v0.1.0`**, or run the workflow manually with **publish enabled**. GitHub repeats validation, obtains temporary credentials, then uploads packages in the manifest's dependency order. A partial upload is possible: NuGet publication is not a transaction across 47 packages. The workflow stops on an upload error rather than silently skipping an existing version. Inspect ownership, versions, and package contents before deciding how to resume.
10496

‎site/content/guide/packages.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Application projects reference the FSharp.CloudEdge libraries by NuGet package I
88

99
## Release availability
1010

11-
The first `0.1.0` release is being prepared. Package links and examples name the intended public versions; they do not assert that publication has completed. The release requires corrected Xantham support packages at `0.1.1` containing Fable source assets; see the [release blocker and reproduction](https://github.com/fsprojects/FSharp.CloudEdge/blob/main/docs/nuget-release.md#current-release-blocker). Until those dependencies are published and public validation passes, use the [contributor source build](local-build.md).
11+
The first `0.1.0` release is being prepared. Package links and examples name the intended public versions; they do not assert that publication has completed. The release uses the published `Xantham.Fable.Core` and `Xantham.Fable.Core.TS` **0.1.0** packages from nuget.org. Until CloudEdge publication and public validation are complete, use the [contributor source build](local-build.md).
1212

1313
The release order is: validate candidate packages and consumers, publish dependencies before their consumers, confirm every `0.1.0` package restores from nuget.org, then announce availability. A package page appearing in search is separate from a clean restore succeeding.
1414

@@ -34,7 +34,7 @@ The NuGet feed is `https://api.nuget.org/v3/index.json`. A package page such as
3434

3535
## Fable and npm dependencies
3636

37-
CloudEdge's runtime and Fable support candidates contain their F# source as well as .NET assemblies. Fable uses that source when compiling the application to JavaScript. The Xantham support dependencies are restored by NuGet and also need those source assets; their current packaging issue is described above. Application developers do not run the binding generators.
37+
CloudEdge's runtime and Fable support candidates contain their F# source as well as .NET assemblies. Fable uses that source when compiling the application to JavaScript. NuGet restores the published Xantham support dependencies transitively. Release validation compiles the site's actual examples against this package combination. Application developers do not run the binding generators.
3838

3939
NuGet does not install the upstream JavaScript SDKs. Where an example imports an npm SDK, install the exact package version shown on its library page. Worker-native APIs such as `Request`, D1, and R2 are supplied by the Workers runtime. The platform type declarations describe those APIs; they are not a JavaScript runtime implementation to bundle.
4040

‎tools/NuGetRelease/Common.fs‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,11 @@ let capture executable arguments =
8989
ensure (proc.ExitCode = 0) $"{executable} failed"
9090
result.Trim()
9191

92-
let writeNuGetConfig path cache candidate supportFeed =
92+
let writeNuGetConfig path cache candidate =
9393
let source name url = xml "add" ["key", name; "value", url] []
9494
let sources = [
9595
xml "clear" [] []
9696
if candidate then source "candidate" feed
97-
match supportFeed with
98-
| Some directory -> source "support-candidate" (Path.GetFullPath directory)
99-
| None -> ()
10097
source "nuget.org" "https://api.nuget.org/v3/index.json"
10198
]
10299
let mapping name pattern = xml "packageSource" ["key", name] [xml "package" ["pattern", pattern] []]
@@ -105,10 +102,6 @@ let writeNuGetConfig path cache candidate supportFeed =
105102
xml "packageSources" [] sources
106103
xml "packageSourceMapping" [] [
107104
if candidate then mapping "candidate" "FSharp.CloudEdge.*"
108-
if Option.isSome supportFeed then
109-
xml "packageSource" ["key", "support-candidate"] [
110-
for id in config.PublicDependencies.Keys do xml "package" ["pattern", id] []
111-
]
112105
mapping "nuget.org" "*"
113106
]
114107
] |> saveXml path

‎tools/NuGetRelease/Consumers.fs‎

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ let audit packages =
4141
let installFable directory =
4242
let tool = Path.Combine(directory, "tools", if OperatingSystem.IsWindows() then "fable.exe" else "fable")
4343
let source = Path.Combine(directory, "Tools.NuGet.Config")
44-
writeNuGetConfig source (Path.Combine(directory, "tool-cache")) false None
44+
writeNuGetConfig source (Path.Combine(directory, "tool-cache")) false
4545
if not (File.Exists tool) then
4646
run "dotnet" ["tool"; "install"; "fable"; "--version"; "5.13.0"; "--tool-path"; Path.GetDirectoryName tool; "--configfile"; source] (Path.Combine(directory, "logs/fable-install.log"))
4747
tool
4848

49-
let prepareConsumerDirectory publicFeed supportFeed =
50-
ensure (not publicFeed || Option.isNone supportFeed) "Public-feed validation cannot use a local support feed"
49+
let prepareConsumerDirectory publicFeed =
5150
let mode = if publicFeed then "public" else "candidate"
5251
let directory = Path.Combine(output, "consumers-" + mode)
5352
if Directory.Exists directory then Directory.Delete(directory, true)
@@ -75,7 +74,7 @@ let prepareConsumerDirectory publicFeed supportFeed =
7574
]
7675
doc.Root.Add supportPins
7776
doc.Save props
78-
writeNuGetConfig (Path.Combine(directory, "NuGet.Config")) (Path.Combine(directory, "cache")) (not publicFeed) supportFeed
77+
writeNuGetConfig (Path.Combine(directory, "NuGet.Config")) (Path.Combine(directory, "cache")) (not publicFeed)
7978
mode, directory
8079

8180
let recordResolvedPackages directory name project =
@@ -94,8 +93,8 @@ let recordResolvedPackages directory name project =
9493
mkdir destination
9594
writeJson (Path.Combine(destination, name + ".json")) packages
9695

97-
let buildExamples (projects: string array) publicFeed emit supportFeed =
98-
let mode, directory = prepareConsumerDirectory publicFeed supportFeed
96+
let buildExamples (projects: string array) publicFeed emit =
97+
let mode, directory = prepareConsumerDirectory publicFeed
9998
let tool = if emit then installFable directory else ""
10099
let results = ResizeArray<ConsumerResult>()
101100
for index, original in Array.indexed projects do
@@ -121,16 +120,15 @@ let buildExamples (projects: string array) publicFeed emit supportFeed =
121120
ensure (failures = 0) $"{failures} package consumers failed; see {directory}/results.json"
122121
printfn "Passed %d isolated %s consumers" results.Count mode
123122

124-
// Public dependency regression: an erased binding can compile even when a package
125-
// omits the source Fable needs for ordinary inline helpers. Test that separately.
126-
let checkSupport supportFeed =
127-
let label = if Option.isSome supportFeed then "candidate-support" else "public-support"
128-
let directory = Path.Combine(output, label)
123+
// Exercise the erased keys and indexers consumed by CloudEdge bindings. The
124+
// separate upstream-helper repro covers APIs these bindings do not call.
125+
let checkSupport () =
126+
let directory = Path.Combine(output, "public-support")
129127
if Directory.Exists directory then Directory.Delete(directory, true)
130128
mkdir directory
131-
writeNuGetConfig (Path.Combine(directory, "NuGet.Config")) (Path.Combine(directory, "cache")) false supportFeed
129+
writeNuGetConfig (Path.Combine(directory, "NuGet.Config")) (Path.Combine(directory, "cache")) false
132130
let tool = installFable directory
133-
for file in ["Smoke.fs"; "UpstreamHelpers.fs"] do
131+
for file in ["Smoke.fs"; "check.mjs"] do
134132
copyFile (Path.Combine(root, "tests/SupportPackage", file)) (Path.Combine(directory, file))
135133
let version = config.PublicDependencies["Xantham.Fable.Core"]
136134
let tsVersion = config.PublicDependencies["Xantham.Fable.Core.TS"]
@@ -139,15 +137,15 @@ let checkSupport supportFeed =
139137
xml "PropertyGroup" [] [valueElement "TargetFramework" "net8.0"]
140138
xml "ItemGroup" [] [
141139
xml "Compile" ["Include", "Smoke.fs"] []
142-
xml "Compile" ["Include", "UpstreamHelpers.fs"] []
143140
xml "PackageReference" ["Include", "Fable.Core"; "Version", "5.2.0"] []
144141
xml "PackageReference" ["Include", "Xantham.Fable.Core"; "Version", $"[{version}]"] []
145142
xml "PackageReference" ["Include", "Xantham.Fable.Core.TS"; "Version", $"[{tsVersion}]"] []
146143
]
147144
] |> saveXml project
148145
run "dotnet" ["build"; project; "--nologo"] (Path.Combine(directory, "logs/build.log"))
149-
run tool [project; "--outDir"; Path.Combine(directory, "js")] (Path.Combine(directory, "logs/fable.log"))
150-
printfn "%s %s builds and emits through Fable" label version
146+
run tool [project; "--outDir"; Path.Combine(directory, "fable-out")] (Path.Combine(directory, "logs/fable.log"))
147+
run "node" [Path.Combine(directory, "check.mjs")] (Path.Combine(directory, "logs/runtime.log"))
148+
printfn "Public support %s builds, emits through Fable and passes binding runtime assertions" version
151149

152150
let normalized (text: string) =
153151
text.Replace("\r\n", "\n").Split('\n') |> Array.map _.TrimEnd() |> Array.skipWhile String.IsNullOrWhiteSpace |> Array.rev |> Array.skipWhile String.IsNullOrWhiteSpace |> Array.rev

‎tools/NuGetRelease/Packages.fs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,13 @@ let verify (projects: Package array) =
148148
Array.iter2 (fun a b -> ensure (a.Id = b.Id && a.Version = b.Version && a.File = b.File && a.Sha256 = b.Sha256) $"Candidate differs from manifest: {a.Id}") actual expected
149149
printfn "Verified %d packages and manifest hashes" actual.Length
150150

151-
let pack jobs supportFeed (projects: Package array) =
151+
let pack jobs (projects: Package array) =
152152
ensure (jobs > 0) "The build process count must be positive"
153153
mkdir feed
154154
let restoreConfig = Path.Combine(output, "NuGet.Config")
155-
writeNuGetConfig restoreConfig (Path.Combine(output, "cache")) true supportFeed
156-
for project in projects do
157-
let cached = Path.Combine(output, "cache", project.Id.ToLowerInvariant(), config.Version)
158-
if Directory.Exists cached then Directory.Delete(cached, true)
155+
let cache = Path.Combine(output, "cache")
156+
if Directory.Exists cache then Directory.Delete(cache, true)
157+
writeNuGetConfig restoreConfig cache true
159158
let commit = capture "git" ["rev-parse"; "HEAD"]
160159
let logDirectory = Path.Combine(output, "pack-logs")
161160
mkdir logDirectory

0 commit comments

Comments
 (0)