Skip to content

Commit 6198665

Browse files
committed
Merge remote-tracking branch 'origin/master' into claude/confident-ramanujan-MqHwi
2 parents ab239a4 + 58226b4 commit 6198665

97 files changed

Lines changed: 2105 additions & 239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Binaries
1+
name: Build / Cross-Platform Binaries
22

33
on:
44
push:

.github/workflows/ci-pfs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI (PFS-MS)
1+
name: CI / Rust (PFS-MS Reference)
22

33
on:
44
push:
@@ -69,7 +69,7 @@ jobs:
6969
- name: Inspect generated test vector
7070
run: |
7171
ls -l pfs_ms_testvector.bin
72-
test "$(wc -c < pfs_ms_testvector.bin)" = "2986"
72+
test "$(wc -c < pfs_ms_testvector.bin)" = "3066"
7373
- uses: actions/upload-artifact@v4
7474
with:
7575
name: pfs-ms-testvector

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI / Rust (PCF Reference)
22

33
on:
44
push:

.github/workflows/dotnet-ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
name: .NET CI
1+
name: CI / .NET
22

33
on:
44
push:
55
branches: [master]
66
paths:
7-
- 'implementations/dotnet/**'
7+
- 'implementations/dotnet/pcf/**'
8+
- 'implementations/dotnet/Directory.Build.props'
89
- '.github/workflows/dotnet-ci.yml'
910
pull_request:
1011
branches: [master]
1112
paths:
12-
- 'implementations/dotnet/**'
13+
- 'implementations/dotnet/pcf/**'
14+
- 'implementations/dotnet/Directory.Build.props'
1315
- '.github/workflows/dotnet-ci.yml'
1416

1517
defaults:
1618
run:
17-
working-directory: implementations/dotnet
19+
working-directory: implementations/dotnet/pcf
1820

1921
jobs:
2022
test:

.github/workflows/php-split.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: PHP subtree split
1+
name: Sync / PHP Split Repository
22

33
on:
44
push:
55
branches: [master]
66
paths:
7-
- 'implementations/php/**'
7+
- 'implementations/php/pcf/**'
88
- '.github/workflows/php-split.yml'
99
workflow_dispatch:
1010
inputs:
@@ -22,7 +22,7 @@ on:
2222

2323
jobs:
2424
split:
25-
name: split implementations/php → kduma-OSS-splits/PHP-PCF-lib
25+
name: split implementations/php/pcf → kduma-OSS-splits/PHP-PCF-lib
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v4
@@ -78,7 +78,7 @@ jobs:
7878
env:
7979
PAT: x-access-token:${{ steps.app-token.outputs.token }}
8080
with:
81-
package_directory: 'implementations/php'
81+
package_directory: 'implementations/php/pcf'
8282
repository_organization: 'kduma-OSS-splits'
8383
repository_name: 'PHP-PCF-lib'
8484
branch: 'master'
@@ -92,7 +92,7 @@ jobs:
9292
PAT: x-access-token:${{ steps.app-token.outputs.token }}
9393
with:
9494
tag: ${{ steps.resolve-tag.outputs.tag }}
95-
package_directory: 'implementations/php'
95+
package_directory: 'implementations/php/pcf'
9696
repository_organization: 'kduma-OSS-splits'
9797
repository_name: 'PHP-PCF-lib'
9898
branch: 'master'

.github/workflows/php.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PHP CI
1+
name: CI / PHP
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88

99
defaults:
1010
run:
11-
working-directory: implementations/php
11+
working-directory: implementations/php/pcf
1212

1313
jobs:
1414
test:
@@ -66,4 +66,4 @@ jobs:
6666
- uses: actions/upload-artifact@v4
6767
with:
6868
name: pcf-testvector-php
69-
path: implementations/php/pcf_testvector.bin
69+
path: implementations/php/pcf/pcf_testvector.bin

.github/workflows/release-prepare.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Prepare Release (bump versions, tag, trigger release)
1+
name: Release / Prepare
22

33
on:
44
workflow_dispatch:
@@ -82,16 +82,16 @@ jobs:
8282
sed -i 's|pcf = { path = "\.\./\.\./reference/PCF-v1.0", version = "[^"]*" }|pcf = { path = "../../reference/PCF-v1.0", version = "'"$NEW"'" }|' tools/pcf-debug/Cargo.toml
8383
sed -i 's|pcf = { path = "\.\./\.\./reference/PCF-v1.0", version = "[^"]*" }|pcf = { path = "../../reference/PCF-v1.0", version = "'"$NEW"'" }|' tools/pcf-compact/Cargo.toml
8484
85-
- name: Bump TypeScript package
85+
- name: Bump TypeScript packages
8686
shell: bash
8787
working-directory: implementations/ts
88-
run: npm version '${{ steps.version.outputs.version }}' --no-git-tag-version --allow-same-version
88+
run: npm version '${{ steps.version.outputs.version }}' -ws --no-git-tag-version --allow-same-version
8989

90-
- name: Bump .NET Pcf.csproj
90+
- name: Bump .NET Directory.Build.props
9191
shell: bash
9292
run: |
9393
NEW='${{ steps.version.outputs.version }}'
94-
sed -i 's|<Version>[^<]*</Version>|<Version>'"$NEW"'</Version>|' implementations/dotnet/src/Pcf/Pcf.csproj
94+
sed -i 's|<Version>[^<]*</Version>|<Version>'"$NEW"'</Version>|' implementations/dotnet/Directory.Build.props
9595
9696
- name: Show diff
9797
run: git --no-pager diff --stat && git --no-pager diff

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release / Publish
22

33
on:
44
push:
@@ -162,13 +162,13 @@ jobs:
162162
- name: Ensure npm >= 11.5.1 (trusted publishing support)
163163
run: npm install -g npm@latest
164164
- run: npm ci
165-
- run: npm run build
165+
- run: npm run build -w @kduma-oss/pcf
166166
- name: npm publish (OIDC trusted publishing, auto-provenance)
167167
run: |
168168
if [ "${{ needs.resolve.outputs.dry_run }}" = "true" ]; then
169-
npm publish --access public --dry-run
169+
npm publish -w @kduma-oss/pcf --access public --dry-run
170170
else
171-
npm publish --access public
171+
npm publish -w @kduma-oss/pcf --access public
172172
fi
173173
174174
publish-nuget:
@@ -180,7 +180,7 @@ jobs:
180180
contents: read
181181
defaults:
182182
run:
183-
working-directory: implementations/dotnet
183+
working-directory: implementations/dotnet/pcf
184184
steps:
185185
- uses: actions/checkout@v4
186186
- uses: actions/setup-dotnet@v4
@@ -212,7 +212,7 @@ jobs:
212212
- uses: actions/upload-artifact@v4
213213
with:
214214
name: nuget-package
215-
path: implementations/dotnet/out/*.nupkg
215+
path: implementations/dotnet/pcf/out/*.nupkg
216216

217217
split-php:
218218
name: Split PHP to packagist source repo

.github/workflows/ts-ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: TS CI
1+
name: CI / TypeScript
22

33
on:
44
push:
@@ -22,7 +22,7 @@ jobs:
2222
cache: npm
2323
cache-dependency-path: implementations/ts/package-lock.json
2424
- run: npm ci
25-
- run: npm run build
25+
- run: npm run build -w @kduma-oss/pcf
2626

2727
test:
2828
name: test (${{ matrix.os }})
@@ -39,7 +39,7 @@ jobs:
3939
cache: npm
4040
cache-dependency-path: implementations/ts/package-lock.json
4141
- run: npm ci
42-
- run: npm test
42+
- run: npm test -w @kduma-oss/pcf
4343

4444
test-vector:
4545
name: regenerate spec test vector
@@ -53,15 +53,15 @@ jobs:
5353
cache-dependency-path: implementations/ts/package-lock.json
5454
- run: npm ci
5555
- name: Build and run the test-vector example
56-
run: npm run gen-testvector -- pcf_testvector.bin
56+
run: npm run gen-testvector -w @kduma-oss/pcf -- pcf_testvector.bin
5757
- name: Inspect generated test vector
5858
run: |
59-
ls -l pcf_testvector.bin
60-
test "$(wc -c < pcf_testvector.bin)" = "395"
59+
ls -l pcf/pcf_testvector.bin
60+
test "$(wc -c < pcf/pcf_testvector.bin)" = "395"
6161
- uses: actions/upload-artifact@v4
6262
with:
6363
name: pcf-testvector-ts
64-
path: implementations/ts/pcf_testvector.bin
64+
path: implementations/ts/pcf/pcf_testvector.bin
6565

6666
coverage:
6767
name: code coverage
@@ -75,8 +75,8 @@ jobs:
7575
cache-dependency-path: implementations/ts/package-lock.json
7676
- run: npm ci
7777
- name: Generate coverage report (enforces >=95% line / 100% function)
78-
run: npm run coverage
78+
run: npm run coverage -w @kduma-oss/pcf
7979
- uses: actions/upload-artifact@v4
8080
with:
8181
name: coverage-lcov-ts
82-
path: implementations/ts/coverage/lcov.info
82+
path: implementations/ts/pcf/coverage/lcov.info

implementations/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Implementations
2+
3+
Production implementations of the Partitioned Container Format family, one
4+
directory per language. Each language directory holds **one subfolder per
5+
library**, so that profiles built *on top of* PCF (e.g. PFS) can live next to it:
6+
7+
```
8+
implementations/
9+
├── php/
10+
│ └── pcf/ # kduma/pcf (Packagist split)
11+
├── ts/
12+
│ ├── package.json # npm workspace root (private)
13+
│ └── pcf/ # @kduma-oss/pcf (npm)
14+
└── dotnet/
15+
├── Directory.Build.props # shared metadata + lockstep <Version>
16+
└── pcf/ # KDuma.Pcf (NuGet)
17+
```
18+
19+
The Rust reference under [`../reference/`](../reference/) is the canonical model:
20+
`PFS-MS-v1.0` depends on `PCF-v1.0` via a path dependency with a pinned version,
21+
and every package is versioned **in lockstep** by
22+
[`release-prepare.yml`](../../.github/workflows/release-prepare.yml).
23+
24+
## Adding a library that depends on PCF (e.g. PFS)
25+
26+
Drop a sibling folder (`…/pfs/`) next to `…/pcf/` and wire the dependency using
27+
the per-ecosystem mechanism below. Local development resolves against the
28+
on-disk PCF; published artifacts depend on the released PCF package.
29+
30+
| Language | Dependency declaration in the PFS manifest | Local dev | Published |
31+
|----------|--------------------------------------------|-----------|-----------|
32+
| Rust | `pcf = { path = "../pcf", version = "X" }` | source on disk | crates.io |
33+
| .NET | `<ProjectReference Include="..\..\..\pcf\src\Pcf\Pcf.csproj" />` | project on disk | `dotnet pack` emits a NuGet dependency `KDuma.Pcf >= X` |
34+
| TS / npm | `"@kduma-oss/pcf": "^X"` + add `pfs` to the root `workspaces` array | workspace symlink to `../pcf` | npm registry |
35+
| PHP | `repositories: [{ type: "path", url: "../pcf" }]` + `require: { "kduma/pcf": "^X" }` | path-repo symlink to `../pcf` | Packagist (path repo ignored downstream) |
36+
37+
What each ecosystem already provides for "readiness":
38+
39+
- **TypeScript**`implementations/ts/package.json` is a private **npm
40+
workspaces** root with a single hoisted `package-lock.json`. Add `"pfs"` to
41+
`workspaces`; CI runs package scripts with `-w @kduma-oss/<pkg>`.
42+
- **.NET**`implementations/dotnet/Directory.Build.props` holds the shared
43+
package metadata and the single lockstep `<Version>`, auto-imported by every
44+
project beneath it. A new library only declares its own `PackageId` /
45+
`Description` and a `ProjectReference` to PCF.
46+
- **PHP** — each library is a self-contained Composer package that is mirrored to
47+
its own Packagist repo by a split workflow. A new library gets its own
48+
`composer.json` (with the path repo above) and a sibling split workflow.

0 commit comments

Comments
 (0)