From 61b60bdc3b5d8f3ece2aff8b3a4045b1c15ebda9 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Wed, 3 Dec 2025 16:31:54 -0500 Subject: [PATCH 01/30] windows build testing --- .github/workflows/release.yml | 268 ++++++++++++---------------------- dist-workspace.toml | 14 +- 2 files changed, 106 insertions(+), 176 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8943753c..54ec767b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,8 +10,8 @@ # * uploads those artifacts to temporary workflow zip # * on success, uploads the artifacts to a GitHub Release # -# Note that the GitHub Release will be created with a generated -# title/body based on your changelogs. +# Note that a GitHub Release with this tag is assumed to exist as a draft +# with the appropriate title/body, and will be undrafted for you. name: Release permissions: @@ -40,13 +40,14 @@ permissions: # will be marked as a prerelease. on: pull_request: - workflow_dispatch: - inputs: - tag: - description: Release Tag - required: true - default: dry-run - type: string + # TEMPORARILY DISABLED FOR TESTING - only PR triggers will work + # workflow_dispatch: + # inputs: + # tag: + # description: Release Tag + # required: true + # default: dry-run + # type: string jobs: # Run 'dist plan' (or host) to determine what tasks we need to do @@ -54,9 +55,9 @@ jobs: runs-on: "ubuntu-22.04" outputs: val: ${{ steps.plan.outputs.manifest }} - tag: ${{ (inputs.tag != 'dry-run' && inputs.tag) || '' }} - tag-flag: ${{ inputs.tag && inputs.tag != 'dry-run' && format('--tag={0}', inputs.tag) || '' }} - publishing: ${{ inputs.tag && inputs.tag != 'dry-run' }} + tag: '' + tag-flag: '' + publishing: 'false' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -81,7 +82,7 @@ jobs: # but also really annoying to build CI around when it needs secrets to work right.) - id: plan run: | - dist ${{ (inputs.tag && inputs.tag != 'dry-run' && format('host --steps=create --tag={0}', inputs.tag)) || 'plan' }} --output-format=json > plan-dist-manifest.json + dist plan --output-format=json > plan-dist-manifest.json echo "dist ran successfully" cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" @@ -97,7 +98,7 @@ jobs: # Let the initial task tell us to not run (currently very blunt) needs: - plan - if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') || inputs.tag == 'dry-run' }} + if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }} strategy: fail-fast: false # Target platforms/runners are computed by dist in create-release. @@ -224,163 +225,86 @@ jobs: ${{ steps.cargo-dist.outputs.paths }} ${{ env.BUILD_MANIFEST_NAME }} # Determines if we should publish/announce - host: - needs: - - plan - - build-local-artifacts - - build-global-artifacts - # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine) - if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - runs-on: "ubuntu-22.04" - outputs: - val: ${{ steps.host.outputs.manifest }} - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - submodules: recursive - - name: Install cached dist - uses: actions/download-artifact@v4 - with: - name: cargo-dist-cache - path: ~/.cargo/bin/ - - run: chmod +x ~/.cargo/bin/dist - # Fetch artifacts from scratch-storage - - name: Fetch artifacts - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: target/distrib/ - merge-multiple: true - # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" - - id: host - shell: bash - run: | - dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json - echo "artifacts uploaded and released successfully" - cat dist-manifest.json - echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" - - name: "Upload dist-manifest.json" - uses: actions/upload-artifact@v4 - with: - # Overwrite the previous copy - name: artifacts-dist-manifest - path: dist-manifest.json - - publish-homebrew-formula: - needs: - - plan - - host - runs-on: "ubuntu-22.04" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PLAN: ${{ needs.plan.outputs.val }} - GITHUB_USER: "axo bot" - GITHUB_EMAIL: "admin+bot@axo.dev" - if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: true - repository: "portofcontext/homebrew-tap" - token: ${{ secrets.HOMEBREW_TAP_TOKEN }} - # So we have access to the formula - - name: Fetch homebrew formulae - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: Formula/ - merge-multiple: true - # This is extra complex because you can make your Formula name not match your app name - # so we need to find releases with a *.rb file, and publish with that filename. - - name: Commit formula files - run: | - git config --global user.name "${GITHUB_USER}" - git config --global user.email "${GITHUB_EMAIL}" - - for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith(".rb")] | any)'); do - filename=$(echo "$release" | jq '.artifacts[] | select(endswith(".rb"))' --raw-output) - name=$(echo "$filename" | sed "s/\.rb$//") - version=$(echo "$release" | jq .app_version --raw-output) - - export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" - brew update - # We avoid reformatting user-provided data such as the app description and homepage. - brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true - - git add "Formula/${filename}" - git commit -m "${name} ${version}" - done - git push - - publish-npm: - needs: - - plan - - host - runs-on: "ubuntu-22.04" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PLAN: ${{ needs.plan.outputs.val }} - if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} - steps: - - name: Fetch npm packages - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: npm/ - merge-multiple: true - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - - run: | - for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith("-npm-package.tar.gz")] | any)'); do - pkg=$(echo "$release" | jq '.artifacts[] | select(endswith("-npm-package.tar.gz"))' --raw-output) - npm publish --access public "./npm/${pkg}" - done - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # host: + # needs: + # - plan + # - build-local-artifacts + # - build-global-artifacts + # # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine) + # if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # runs-on: "ubuntu-22.04" + # outputs: + # val: ${{ steps.host.outputs.manifest }} + # steps: + # - uses: actions/checkout@v4 + # with: + # persist-credentials: false + # submodules: recursive + # - name: Install cached dist + # uses: actions/download-artifact@v4 + # with: + # name: cargo-dist-cache + # path: ~/.cargo/bin/ + # - run: chmod +x ~/.cargo/bin/dist + # # Fetch artifacts from scratch-storage + # - name: Fetch artifacts + # uses: actions/download-artifact@v4 + # with: + # pattern: artifacts-* + # path: target/distrib/ + # merge-multiple: true + # # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" + # - id: host + # shell: bash + # run: | + # dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json + # echo "artifacts uploaded and released successfully" + # cat dist-manifest.json + # echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" + # - name: "Upload dist-manifest.json" + # uses: actions/upload-artifact@v4 + # with: + # # Overwrite the previous copy + # name: artifacts-dist-manifest + # path: dist-manifest.json # Create a GitHub Release while uploading all files to it - announce: - needs: - - plan - - host - - publish-homebrew-formula - - publish-npm - # use "always() && ..." to allow us to wait for all publish jobs while - # still allowing individual publish jobs to skip themselves (for prereleases). - # "host" however must run to completion, no skipping allowed! - if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') && (needs.publish-npm.result == 'skipped' || needs.publish-npm.result == 'success') }} - runs-on: "ubuntu-22.04" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - submodules: recursive - # Create a GitHub Release while uploading all files to it - - name: "Download GitHub Artifacts" - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: artifacts - merge-multiple: true - - name: Cleanup - run: | - # Remove the granular manifests - rm -f artifacts/*-dist-manifest.json - - name: Create GitHub Release - env: - PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}" - ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}" - ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}" - RELEASE_COMMIT: "${{ github.sha }}" - run: | - # Write and read notes from a file to avoid quoting breaking things - echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt - - gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/* + # TEMPORARILY DISABLED FOR TESTING - artifacts will only be uploaded to workflow artifacts + # announce: + # needs: + # - plan + # - host + # # use "always() && ..." to allow us to wait for all publish jobs while + # # still allowing individual publish jobs to skip themselves (for prereleases). + # # "host" however must run to completion, no skipping allowed! + # if: ${{ always() && needs.host.result == 'success' }} + # runs-on: "ubuntu-22.04" + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # steps: + # - uses: actions/checkout@v4 + # with: + # persist-credentials: false + # submodules: recursive + # # Create a GitHub Release while uploading all files to it + # - name: "Download GitHub Artifacts" + # uses: actions/download-artifact@v4 + # with: + # pattern: artifacts-* + # path: artifacts + # merge-multiple: true + # - name: Cleanup + # run: | + # # Remove the granular manifests + # rm -f artifacts/*-dist-manifest.json + # - name: Create GitHub Release + # env: + # PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}" + # RELEASE_COMMIT: "${{ github.sha }}" + # run: | + # # If we're editing a release in place, we need to upload things ahead of time + # gh release upload "${{ needs.plan.outputs.tag }}" artifacts/* + # + # gh release edit "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --draft=false diff --git a/dist-workspace.toml b/dist-workspace.toml index bc493c7b..08ba83d2 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -14,7 +14,8 @@ windows-archive = ".zip" # The archive format to use for non-windows builds (defaults .tar.xz) unix-archive = ".tar.gz" # Whether dist should create a Github Release or use an existing draft -create-release = true +# Temporarily disabled for testing Windows build +create-release = false # Whether CI should trigger releases with dispatches instead of tag pushes dispatch-releases = true # Which phase dist should use to create the GitHub release @@ -22,11 +23,14 @@ github-release = "announce" # Path that installers should place binaries in install-path = "~/.local/bin" # Which actions to run on pull requests -pr-run-mode = "plan" +# Temporarily set to "upload" to test Windows build on PRs +pr-run-mode = "upload" # Whether CI should include auto-generated code to build local artifacts build-local-artifacts = true # Target platforms to build apps for (Rust target-triple syntax) -targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"] +# Temporarily testing Windows only +targets = ["x86_64-pc-windows-msvc"] +# targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] # Where to host releases hosting = "github" # Whether to install an updater program @@ -40,4 +44,6 @@ npm-scope = "@portofcontext" # A GitHub repo to push Homebrew formulas to tap = "portofcontext/homebrew-tap" # Publish jobs to run in CI -publish-jobs = ["homebrew", "npm"] +# Temporarily disabled for testing Windows build +# publish-jobs = ["homebrew", "npm"] +publish-jobs = [] From c22ac822a602cc4c7cd5770ca73f430c9d1ff913 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Wed, 3 Dec 2025 16:33:40 -0500 Subject: [PATCH 02/30] allow dirty for tests --- dist-workspace.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist-workspace.toml b/dist-workspace.toml index 08ba83d2..0d4a9668 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -5,6 +5,8 @@ members = ["cargo:."] [dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.30.2" +# Allow custom edits to CI files for testing +allow-dirty = ["ci"] # CI backends to support ci = "github" # The installers to generate for each app From 57254667d2b1670bff24d903acb55b0657348234 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Wed, 3 Dec 2025 16:52:15 -0500 Subject: [PATCH 03/30] windows system dependency downgrade for build --- .gitignore | 3 ++- Cargo.lock | 10 ++++++---- Cargo.toml | 1 + crates/deno_executor/Cargo.toml | 4 +++- crates/pctx/Cargo.toml | 2 ++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index c073604a..854e3e30 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.iml .claude pctx.json -pctx-dev.jsonl \ No newline at end of file +pctx-dev.jsonl +CLAUDE.md \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index d305c40e..72479e62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1440,7 +1440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -2357,7 +2357,7 @@ dependencies = [ "tokio", "tracing", "url", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3926,7 +3926,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix 1.1.2", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -6778,6 +6778,7 @@ dependencies = [ "tracing-subscriber", "tui-markdown", "url", + "windows-sys 0.59.0", ] [[package]] @@ -7860,7 +7861,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -8666,6 +8667,7 @@ dependencies = [ "cfg-if", "libc", "psm", + "windows-sys 0.52.0", "windows-sys 0.59.0", ] diff --git a/Cargo.toml b/Cargo.toml index f9c87fad..4e89ef4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ repository = "https://github.com/portofcontext/pctx" [workspace.dependencies] tracing = "0.1.41" thiserror = "2.0" +windows-sys = "0.59" [workspace.lints.rust] diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index 81c94576..1f335286 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -24,7 +24,9 @@ tracing = { workspace = true } futures = "0.3" [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.61.2", features = [ +# Need version 0.59 to match deno_subprocess_windows transitive dependency +# and ensure the feature is enabled for it as well +windows-sys = { workspace = true, features = [ "Win32_System_SystemInformation", ] } diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index c6be05e0..604446f9 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -99,6 +99,8 @@ tikv-jemallocator = "0.6.0" [target.'cfg(target_os = "windows")'.dependencies] mimalloc = "0.1.43" +# Fix for deno_subprocess_windows missing feature +windows-sys = { workspace = true, features = ["Win32_System_SystemInformation"] } [dev-dependencies] tempfile = "3.8" From 5ba7c988e089b528b552fb8508cb7e67c3a15ac5 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Wed, 3 Dec 2025 17:06:03 -0500 Subject: [PATCH 04/30] install nasm in action --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54ec767b..45c6db72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,6 +138,13 @@ jobs: fi - name: Install dist run: ${{ matrix.install_dist.run }} + # Install NASM for Windows builds (required by aws-lc-sys) + - name: Install NASM (Windows) + if: runner.os == 'Windows' + run: | + choco install nasm -y + echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + shell: pwsh # Get the dist-manifest - name: Fetch local artifacts uses: actions/download-artifact@v4 From 5cebbc991bf075296d1460b682a09140d70cecf6 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Wed, 3 Dec 2025 17:21:18 -0500 Subject: [PATCH 05/30] pdb bug fix --- Cargo.toml | 2 ++ dist-workspace.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 4e89ef4e..86e3db57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,8 @@ strip = true [profile.dist] inherits = "release" lto = "thin" +# Reduce debug info to avoid Windows PDB size limits (LNK1318 error) +debug = 0 # [profile.dev.package."*"] diff --git a/dist-workspace.toml b/dist-workspace.toml index 0d4a9668..8a21ab4e 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -9,6 +9,8 @@ cargo-dist-version = "0.30.2" allow-dirty = ["ci"] # CI backends to support ci = "github" +# NOTE: NASM is manually installed in release.yml for Windows builds (required by aws-lc-sys) +# This can't be automated via cargo-dist system-dependencies yet # The installers to generate for each app installers = ["shell", "npm", "homebrew"] # The archive format to use for windows builds (defaults .zip) From 099dcd677a58c5af5dce8a5130f112b94e86b281 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 07:14:29 -0500 Subject: [PATCH 06/30] pdb bug fix in build not just dist --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 86e3db57..fc73c7f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,8 @@ opt-level = 3 lto = "fat" codegen-units = 1 strip = true +# Reduce debug info to avoid Windows PDB size limits (LNK1318 error) in build scripts +debug = 0 # The profile that 'dist' will build with [profile.dist] From c8cf681bf33355d564f44dcbe28f172c9c4750a5 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 07:43:14 -0500 Subject: [PATCH 07/30] pdb more toml space save attempts --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fc73c7f5..9fd855f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,11 +32,14 @@ too_many_lines = "allow" [profile.release] opt-level = 3 -lto = "fat" +# Use thin LTO to reduce PDB size on Windows (fat LTO creates massive PDB files) +lto = "thin" codegen-units = 1 strip = true # Reduce debug info to avoid Windows PDB size limits (LNK1318 error) in build scripts debug = 0 +# Completely disable PDB generation on Windows to avoid linker limits +split-debuginfo = "off" # The profile that 'dist' will build with [profile.dist] @@ -44,6 +47,7 @@ inherits = "release" lto = "thin" # Reduce debug info to avoid Windows PDB size limits (LNK1318 error) debug = 0 +split-debuginfo = "off" # [profile.dev.package."*"] From 01d7cb029ec1df722996d89f555f78a9bed9555c Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 08:23:26 -0500 Subject: [PATCH 08/30] pdb more toml space save attempts --- Cargo.toml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9fd855f4..abc88e69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,12 +34,11 @@ too_many_lines = "allow" opt-level = 3 # Use thin LTO to reduce PDB size on Windows (fat LTO creates massive PDB files) lto = "thin" -codegen-units = 1 -strip = true -# Reduce debug info to avoid Windows PDB size limits (LNK1318 error) in build scripts +# Increase codegen units to reduce per-unit size and avoid Windows PDB limits +codegen-units = 16 +strip = "debuginfo" +# Completely disable debug info to avoid Windows PDB size limits (LNK1318 error) debug = 0 -# Completely disable PDB generation on Windows to avoid linker limits -split-debuginfo = "off" # The profile that 'dist' will build with [profile.dist] @@ -47,7 +46,6 @@ inherits = "release" lto = "thin" # Reduce debug info to avoid Windows PDB size limits (LNK1318 error) debug = 0 -split-debuginfo = "off" # [profile.dev.package."*"] From 805825405c2eb20d6b20f9c9710d74d663e57fc2 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 08:42:27 -0500 Subject: [PATCH 09/30] windows build overrides --- .cargo/config.toml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 4ba718d4..76c461dd 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,25 @@ # Windows-specific linker configuration to avoid PDB errors [target.x86_64-pc-windows-msvc] -# Use /DEBUG:NONE to completely disable PDB generation in debug builds -# This avoids LNK1318 errors when too many PDBs are generated in parallel -rustflags = ["-C", "link-args=/DEBUG:NONE"] +# Disable incremental compilation and debug info to avoid LNK1318 PDB size limits +rustflags = [ + "-C", "incremental=off", + "-C", "debuginfo=0", +] + +# Disable LTO for build scripts to avoid Windows PDB size limits (LNK1318) +# Build scripts that use large dependencies (like V8/deno_core) generate +# enormous object files when compiled with LTO, exceeding Windows linker limits +[profile.release.build-override] +opt-level = 0 +lto = false +debug = false +incremental = false + +[profile.dist.build-override] +opt-level = 0 +lto = false +debug = false +incremental = false [alias] pctx = "run -p pctx --" From df376e2e001f4f01263399895f9e2fb1676b3e44 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 08:53:38 -0500 Subject: [PATCH 10/30] windows build overrides --- .cargo/config.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 76c461dd..d2d7ed77 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,18 +6,16 @@ rustflags = [ "-C", "debuginfo=0", ] -# Disable LTO for build scripts to avoid Windows PDB size limits (LNK1318) +# Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) # Build scripts that use large dependencies (like V8/deno_core) generate -# enormous object files when compiled with LTO, exceeding Windows linker limits +# enormous object files when heavily optimized, exceeding Windows linker limits [profile.release.build-override] opt-level = 0 -lto = false debug = false incremental = false [profile.dist.build-override] opt-level = 0 -lto = false debug = false incremental = false From 7f9be6217f731d39bfc51e4898c5063214f05f4b Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 15:54:02 -0500 Subject: [PATCH 11/30] try flagging debug home for windows --- .cargo/config.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index d2d7ed77..8e0fa6ff 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,9 +1,11 @@ # Windows-specific linker configuration to avoid PDB errors [target.x86_64-pc-windows-msvc] # Disable incremental compilation and debug info to avoid LNK1318 PDB size limits +# Use /DEBUG:NONE to completely disable PDB generation rustflags = [ "-C", "incremental=off", "-C", "debuginfo=0", + "-C", "link-arg=/DEBUG:NONE", ] # Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) From ee373a09cbe6e8648914284c6fed421ff393033c Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 16:47:07 -0500 Subject: [PATCH 12/30] try flagging debug home for windows --- .cargo/config.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8e0fa6ff..566e9cb4 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,10 +2,25 @@ [target.x86_64-pc-windows-msvc] # Disable incremental compilation and debug info to avoid LNK1318 PDB size limits # Use /DEBUG:NONE to completely disable PDB generation +# /NODEFAULTLIB:libcmt to suppress LNK4098 warning rustflags = [ "-C", "incremental=off", "-C", "debuginfo=0", "-C", "link-arg=/DEBUG:NONE", + "-C", "link-arg=/NODEFAULTLIB:libcmt", + "-C", "link-arg=/INCREMENTAL:NO", + "-C", "link-arg=/PDB:NONE", +] + +# Apply same flags to build scripts to prevent PDB errors during build script compilation +[target.x86_64-pc-windows-msvc.build] +rustflags = [ + "-C", "incremental=off", + "-C", "debuginfo=0", + "-C", "link-arg=/DEBUG:NONE", + "-C", "link-arg=/NODEFAULTLIB:libcmt", + "-C", "link-arg=/INCREMENTAL:NO", + "-C", "link-arg=/PDB:NONE", ] # Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) @@ -15,11 +30,13 @@ rustflags = [ opt-level = 0 debug = false incremental = false +split-debuginfo = "off" [profile.dist.build-override] opt-level = 0 debug = false incremental = false +split-debuginfo = "off" [alias] pctx = "run -p pctx --" From 6050acfefe91b12e76be67b58755c9ece3c0ea7c Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 16:56:13 -0500 Subject: [PATCH 13/30] text updates --- .cargo/config.toml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 566e9cb4..c44a0323 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,24 +3,14 @@ # Disable incremental compilation and debug info to avoid LNK1318 PDB size limits # Use /DEBUG:NONE to completely disable PDB generation # /NODEFAULTLIB:libcmt to suppress LNK4098 warning +# /OPT:NOREF reduces object file size rustflags = [ "-C", "incremental=off", "-C", "debuginfo=0", "-C", "link-arg=/DEBUG:NONE", "-C", "link-arg=/NODEFAULTLIB:libcmt", "-C", "link-arg=/INCREMENTAL:NO", - "-C", "link-arg=/PDB:NONE", -] - -# Apply same flags to build scripts to prevent PDB errors during build script compilation -[target.x86_64-pc-windows-msvc.build] -rustflags = [ - "-C", "incremental=off", - "-C", "debuginfo=0", - "-C", "link-arg=/DEBUG:NONE", - "-C", "link-arg=/NODEFAULTLIB:libcmt", - "-C", "link-arg=/INCREMENTAL:NO", - "-C", "link-arg=/PDB:NONE", + "-C", "link-arg=/OPT:NOREF", ] # Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) From 40159452e95aadfc89a14cc350a6db35de7ca4e0 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 17:12:36 -0500 Subject: [PATCH 14/30] language updates --- .cargo/config.toml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c44a0323..10ea2f25 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -4,29 +4,39 @@ # Use /DEBUG:NONE to completely disable PDB generation # /NODEFAULTLIB:libcmt to suppress LNK4098 warning # /OPT:NOREF reduces object file size +# /EMITPOGOPHASEINFO disables PDB usage rustflags = [ "-C", "incremental=off", "-C", "debuginfo=0", + "-C", "codegen-units=256", "-C", "link-arg=/DEBUG:NONE", "-C", "link-arg=/NODEFAULTLIB:libcmt", "-C", "link-arg=/INCREMENTAL:NO", "-C", "link-arg=/OPT:NOREF", + "-C", "link-arg=/PDBALTPATH:none", ] +# Set environment variable to disable PDB generation on Windows +[env] +# Force disable PDB generation for all Windows MSVC builds +_NO_DEBUG_HEAP = "1" + # Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) # Build scripts that use large dependencies (like V8/deno_core) generate # enormous object files when heavily optimized, exceeding Windows linker limits [profile.release.build-override] opt-level = 0 -debug = false +debug = 0 incremental = false split-debuginfo = "off" +codegen-units = 256 [profile.dist.build-override] opt-level = 0 -debug = false +debug = 0 incremental = false split-debuginfo = "off" +codegen-units = 256 [alias] pctx = "run -p pctx --" From 31f5eb47666788824ffa92858b7df0d42580f243 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Thu, 4 Dec 2025 17:28:18 -0500 Subject: [PATCH 15/30] language updates --- .cargo/config.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 10ea2f25..c3c3d792 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,10 +1,11 @@ # Windows-specific linker configuration to avoid PDB errors [target.x86_64-pc-windows-msvc] +# Use lld-link instead of link.exe to avoid PDB size limits (LNK1318) +# lld-link is LLVM's linker and doesn't have the same PDB limitations as MSVC's link.exe +linker = "rust-lld" # Disable incremental compilation and debug info to avoid LNK1318 PDB size limits # Use /DEBUG:NONE to completely disable PDB generation # /NODEFAULTLIB:libcmt to suppress LNK4098 warning -# /OPT:NOREF reduces object file size -# /EMITPOGOPHASEINFO disables PDB usage rustflags = [ "-C", "incremental=off", "-C", "debuginfo=0", @@ -13,7 +14,6 @@ rustflags = [ "-C", "link-arg=/NODEFAULTLIB:libcmt", "-C", "link-arg=/INCREMENTAL:NO", "-C", "link-arg=/OPT:NOREF", - "-C", "link-arg=/PDBALTPATH:none", ] # Set environment variable to disable PDB generation on Windows From b859e1ee4228571030ef362817849b49c2b82020 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 09:55:43 -0500 Subject: [PATCH 16/30] now debug ci to fix build caused by the windows related changes --- .cargo/config.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c3c3d792..1256a409 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -16,11 +16,6 @@ rustflags = [ "-C", "link-arg=/OPT:NOREF", ] -# Set environment variable to disable PDB generation on Windows -[env] -# Force disable PDB generation for all Windows MSVC builds -_NO_DEBUG_HEAP = "1" - # Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) # Build scripts that use large dependencies (like V8/deno_core) generate # enormous object files when heavily optimized, exceeding Windows linker limits From 21381dbf51ae88c983ebd048d3400aeb075d69d0 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 10:14:39 -0500 Subject: [PATCH 17/30] now debug ci to fix build caused by the windows related changes --- .cargo/config.toml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 1256a409..1b31dc5e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -19,19 +19,16 @@ rustflags = [ # Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) # Build scripts that use large dependencies (like V8/deno_core) generate # enormous object files when heavily optimized, exceeding Windows linker limits -[profile.release.build-override] +# Only apply these settings on Windows to avoid breaking other platforms +[target.x86_64-pc-windows-msvc.profile.release.build-override] opt-level = 0 debug = 0 incremental = false -split-debuginfo = "off" -codegen-units = 256 -[profile.dist.build-override] +[target.x86_64-pc-windows-msvc.profile.dist.build-override] opt-level = 0 debug = 0 incremental = false -split-debuginfo = "off" -codegen-units = 256 [alias] pctx = "run -p pctx --" From 372b6bf303f0c0c76cbbf7fed1c13eb14251f77c Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 10:26:12 -0500 Subject: [PATCH 18/30] remove debugging changes to fix both builds --- .cargo/config.toml | 14 -------------- Cargo.toml | 1 - 2 files changed, 15 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 1b31dc5e..0ed03070 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -16,19 +16,5 @@ rustflags = [ "-C", "link-arg=/OPT:NOREF", ] -# Reduce optimization for build scripts to avoid Windows PDB size limits (LNK1318) -# Build scripts that use large dependencies (like V8/deno_core) generate -# enormous object files when heavily optimized, exceeding Windows linker limits -# Only apply these settings on Windows to avoid breaking other platforms -[target.x86_64-pc-windows-msvc.profile.release.build-override] -opt-level = 0 -debug = 0 -incremental = false - -[target.x86_64-pc-windows-msvc.profile.dist.build-override] -opt-level = 0 -debug = 0 -incremental = false - [alias] pctx = "run -p pctx --" diff --git a/Cargo.toml b/Cargo.toml index abc88e69..d8aa8b88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,6 @@ lto = "thin" # Reduce debug info to avoid Windows PDB size limits (LNK1318 error) debug = 0 - # [profile.dev.package."*"] # opt-level = 3 # debug = true From 786afd938e92d0179d046c7303766d07cf081b59 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 12:10:30 -0500 Subject: [PATCH 19/30] try windows sys update --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72479e62..2376686f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2357,7 +2357,7 @@ dependencies = [ "tokio", "tracing", "url", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -6778,7 +6778,7 @@ dependencies = [ "tracing-subscriber", "tui-markdown", "url", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d8aa8b88..ee689939 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/portofcontext/pctx" [workspace.dependencies] tracing = "0.1.41" thiserror = "2.0" -windows-sys = "0.59" +windows-sys = "0.61.2" [workspace.lints.rust] From 0d335593c6cbcc0ced31135b6d741dc8fe04db18 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 12:32:51 -0500 Subject: [PATCH 20/30] try no windows sys dep --- Cargo.lock | 22 ---------------------- Cargo.toml | 3 +-- crates/deno_executor/Cargo.toml | 12 ++++++------ crates/pctx/Cargo.toml | 8 ++++---- 4 files changed, 11 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2376686f..87790a93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2357,7 +2357,6 @@ dependencies = [ "tokio", "tracing", "url", - "windows-sys 0.61.2", ] [[package]] @@ -5594,16 +5593,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" -[[package]] -name = "libmimalloc-sys" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "libredox" version = "0.1.10" @@ -5805,15 +5794,6 @@ dependencies = [ "paste", ] -[[package]] -name = "mimalloc" -version = "0.1.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8" -dependencies = [ - "libmimalloc-sys", -] - [[package]] name = "mime" version = "0.3.17" @@ -6754,7 +6734,6 @@ dependencies = [ "env_logger", "indexmap 2.12.0", "inquire", - "mimalloc", "notify 8.2.0", "opentelemetry 0.31.0", "opentelemetry-otlp 0.31.0", @@ -6778,7 +6757,6 @@ dependencies = [ "tracing-subscriber", "tui-markdown", "url", - "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ee689939..66f408fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,8 +11,7 @@ repository = "https://github.com/portofcontext/pctx" [workspace.dependencies] tracing = "0.1.41" thiserror = "2.0" -windows-sys = "0.61.2" - +# windows-sys = "0.59" [workspace.lints.rust] unreachable_pub = "warn" diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index 1f335286..74f26fe6 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -23,12 +23,12 @@ thiserror = { workspace = true } tracing = { workspace = true } futures = "0.3" -[target.'cfg(windows)'.dependencies] -# Need version 0.59 to match deno_subprocess_windows transitive dependency -# and ensure the feature is enabled for it as well -windows-sys = { workspace = true, features = [ - "Win32_System_SystemInformation", -] } +# [target.'cfg(windows)'.dependencies] +# # Need version 0.59 to match deno_subprocess_windows transitive dependency +# # and ensure the feature is enabled for it as well +# windows-sys = { workspace = true, features = [ +# "Win32_System_SystemInformation", +# ] } [dev-dependencies] rustls = { version = "0.23", default-features = false, features = [ diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index 604446f9..c04609ce 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -97,10 +97,10 @@ anyhow = "1.0" [target.'cfg(all(not(target_env = "msvc"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies] tikv-jemallocator = "0.6.0" -[target.'cfg(target_os = "windows")'.dependencies] -mimalloc = "0.1.43" -# Fix for deno_subprocess_windows missing feature -windows-sys = { workspace = true, features = ["Win32_System_SystemInformation"] } +# [target.'cfg(target_os = "windows")'.dependencies] +# mimalloc = "0.1.43" +# # Fix for deno_subprocess_windows missing feature +# windows-sys = { workspace = true, features = ["Win32_System_SystemInformation"] } [dev-dependencies] tempfile = "3.8" From f4bbf6c24b92103ac783bc130035c2b38f68f946 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 12:44:39 -0500 Subject: [PATCH 21/30] try one crate with windows dep --- crates/deno_executor/Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index 74f26fe6..1f335286 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -23,12 +23,12 @@ thiserror = { workspace = true } tracing = { workspace = true } futures = "0.3" -# [target.'cfg(windows)'.dependencies] -# # Need version 0.59 to match deno_subprocess_windows transitive dependency -# # and ensure the feature is enabled for it as well -# windows-sys = { workspace = true, features = [ -# "Win32_System_SystemInformation", -# ] } +[target.'cfg(windows)'.dependencies] +# Need version 0.59 to match deno_subprocess_windows transitive dependency +# and ensure the feature is enabled for it as well +windows-sys = { workspace = true, features = [ + "Win32_System_SystemInformation", +] } [dev-dependencies] rustls = { version = "0.23", default-features = false, features = [ From 2c0b4993ae5bd26efa81b5fca23a5ca535225e12 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 13:00:47 -0500 Subject: [PATCH 22/30] typo in 1 windows dep --- Cargo.lock | 1 + crates/deno_executor/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 87790a93..3762361c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2357,6 +2357,7 @@ dependencies = [ "tokio", "tracing", "url", + "windows-sys 0.59.0", ] [[package]] diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index 1f335286..12e2f85d 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -26,7 +26,7 @@ futures = "0.3" [target.'cfg(windows)'.dependencies] # Need version 0.59 to match deno_subprocess_windows transitive dependency # and ensure the feature is enabled for it as well -windows-sys = { workspace = true, features = [ +windows-sys = { version = "0.59", features = [ "Win32_System_SystemInformation", ] } From db98680dbc20009dbcb5066e5202c600e74f35f7 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 13:13:28 -0500 Subject: [PATCH 23/30] try clang system-dep in pctx cargo.toml:dist --- crates/pctx/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index c04609ce..ad34e657 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -110,3 +110,6 @@ workspace = true [package.metadata.dist] dist = true +# System dependencies needed for rusqlite/libsqlite3-sys build via bindgen +# bindgen requires libclang and C standard library headers +system-dependencies = "libclang-dev clang" From 878091d07a1e9dd7a4ac0d5e23dc605499860c28 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 14:26:28 -0500 Subject: [PATCH 24/30] system deps change and windows mimalloc dep --- Cargo.lock | 27 +++++++++++++++++++++++---- crates/pctx/Cargo.toml | 12 ++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3762361c..fa3a2741 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1440,7 +1440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -3926,7 +3926,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix 1.1.2", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5594,6 +5594,16 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "libmimalloc-sys" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "libredox" version = "0.1.10" @@ -5795,6 +5805,15 @@ dependencies = [ "paste", ] +[[package]] +name = "mimalloc" +version = "0.1.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8" +dependencies = [ + "libmimalloc-sys", +] + [[package]] name = "mime" version = "0.3.17" @@ -6735,6 +6754,7 @@ dependencies = [ "env_logger", "indexmap 2.12.0", "inquire", + "mimalloc", "notify 8.2.0", "opentelemetry 0.31.0", "opentelemetry-otlp 0.31.0", @@ -7840,7 +7860,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -8646,7 +8666,6 @@ dependencies = [ "cfg-if", "libc", "psm", - "windows-sys 0.52.0", "windows-sys 0.59.0", ] diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index ad34e657..b021ce32 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -97,10 +97,8 @@ anyhow = "1.0" [target.'cfg(all(not(target_env = "msvc"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies] tikv-jemallocator = "0.6.0" -# [target.'cfg(target_os = "windows")'.dependencies] -# mimalloc = "0.1.43" -# # Fix for deno_subprocess_windows missing feature -# windows-sys = { workspace = true, features = ["Win32_System_SystemInformation"] } +[target.'cfg(target_os = "windows")'.dependencies] +mimalloc = "0.1.43" [dev-dependencies] tempfile = "3.8" @@ -110,6 +108,8 @@ workspace = true [package.metadata.dist] dist = true + # System dependencies needed for rusqlite/libsqlite3-sys build via bindgen -# bindgen requires libclang and C standard library headers -system-dependencies = "libclang-dev clang" +# bindgen requires libclang (version 9.0 or greater) and C standard library headers +[package.metadata.dist.dependencies.apt] +libclang-dev = "*" From 80803d12f8747d14471635fbf747a1a0438cddc7 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 14:36:27 -0500 Subject: [PATCH 25/30] system deps change for ci --- crates/pctx/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index b021ce32..769584c4 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -111,5 +111,7 @@ dist = true # System dependencies needed for rusqlite/libsqlite3-sys build via bindgen # bindgen requires libclang (version 9.0 or greater) and C standard library headers +# libc6-dev provides stdarg.h and other C standard library headers [package.metadata.dist.dependencies.apt] libclang-dev = "*" +libc6-dev = "*" From 682366da1b245c7b3c94f138ea703c8f9184c6e5 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 14:53:38 -0500 Subject: [PATCH 26/30] try bundled rusqlite --- Cargo.lock | 1 + crates/deno_executor/Cargo.toml | 4 ++++ crates/pctx/Cargo.toml | 7 ------- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa3a2741..d338e0a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2347,6 +2347,7 @@ dependencies = [ "pctx_config", "pctx_type_check_runtime", "regex", + "rusqlite", "rustls", "serde", "serde_json", diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index 12e2f85d..442e4f96 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -22,6 +22,10 @@ regex = "1.11" thiserror = { workspace = true } tracing = { workspace = true } futures = "0.3" +# Force bundled SQLite to avoid bindgen/libclang issues in CI +# This forces all transitive dependencies (deno_runtime -> deno_kv -> rusqlite) +# to use the bundled feature which doesn't require libclang +rusqlite = { version = "0.37.0", features = ["bundled"] } [target.'cfg(windows)'.dependencies] # Need version 0.59 to match deno_subprocess_windows transitive dependency diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index 769584c4..c6be05e0 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -108,10 +108,3 @@ workspace = true [package.metadata.dist] dist = true - -# System dependencies needed for rusqlite/libsqlite3-sys build via bindgen -# bindgen requires libclang (version 9.0 or greater) and C standard library headers -# libc6-dev provides stdarg.h and other C standard library headers -[package.metadata.dist.dependencies.apt] -libclang-dev = "*" -libc6-dev = "*" From cb5414feb001ee6bac31ec6363e3ef783f253ddd Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 14:58:03 -0500 Subject: [PATCH 27/30] older rusqlite --- Cargo.lock | 4 ++-- crates/deno_executor/Cargo.toml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d338e0a9..5f958d5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -653,7 +653,7 @@ dependencies = [ "bitflags 2.10.0", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.12.1", "proc-macro2", "quote", "regex", @@ -671,7 +671,7 @@ dependencies = [ "bitflags 2.10.0", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.12.1", "log", "prettyplease", "proc-macro2", diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index 442e4f96..a04f8913 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -25,7 +25,8 @@ futures = "0.3" # Force bundled SQLite to avoid bindgen/libclang issues in CI # This forces all transitive dependencies (deno_runtime -> deno_kv -> rusqlite) # to use the bundled feature which doesn't require libclang -rusqlite = { version = "0.37.0", features = ["bundled"] } +# Must match the version used by deno_runtime (0.34.0) to avoid conflicts +rusqlite = { version = "=0.34.0", features = ["bundled"] } [target.'cfg(windows)'.dependencies] # Need version 0.59 to match deno_subprocess_windows transitive dependency From 6653ed4c1ec33d2847900ab2fd22880c40e21d32 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 15:20:01 -0500 Subject: [PATCH 28/30] update ci yaml --- .github/workflows/ci.yaml | 8 ++++++++ Cargo.lock | 1 - crates/deno_executor/Cargo.toml | 5 ----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 90964564..fca23483 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -81,6 +81,14 @@ jobs: with: # Clean up old cache entries to save space cache-on-failure: false + + # Install build dependencies for libsqlite3-sys bindgen + - name: Install build dependencies (Linux) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libclang-dev libc6-dev + # - name: Set Windows build jobs # if: matrix.os == 'windows-latest' # run: echo "CARGO_BUILD_JOBS=1" >> $GITHUB_ENV diff --git a/Cargo.lock b/Cargo.lock index 5f958d5d..60278558 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2347,7 +2347,6 @@ dependencies = [ "pctx_config", "pctx_type_check_runtime", "regex", - "rusqlite", "rustls", "serde", "serde_json", diff --git a/crates/deno_executor/Cargo.toml b/crates/deno_executor/Cargo.toml index a04f8913..12e2f85d 100644 --- a/crates/deno_executor/Cargo.toml +++ b/crates/deno_executor/Cargo.toml @@ -22,11 +22,6 @@ regex = "1.11" thiserror = { workspace = true } tracing = { workspace = true } futures = "0.3" -# Force bundled SQLite to avoid bindgen/libclang issues in CI -# This forces all transitive dependencies (deno_runtime -> deno_kv -> rusqlite) -# to use the bundled feature which doesn't require libclang -# Must match the version used by deno_runtime (0.34.0) to avoid conflicts -rusqlite = { version = "=0.34.0", features = ["bundled"] } [target.'cfg(windows)'.dependencies] # Need version 0.59 to match deno_subprocess_windows transitive dependency From 1e1c3f06fd1b22d44bb9a7ae468d9d64e57d9615 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 15:50:56 -0500 Subject: [PATCH 29/30] restore dist --- .github/workflows/release.yml | 275 +++++++++++++++++++++------------- .gitignore | 3 +- CLAUDE.md | 0 Cargo.toml | 1 - crates/pctx/Cargo.toml | 8 + dist-workspace.toml | 23 ++- 6 files changed, 190 insertions(+), 120 deletions(-) create mode 100644 CLAUDE.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45c6db72..8943753c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,8 +10,8 @@ # * uploads those artifacts to temporary workflow zip # * on success, uploads the artifacts to a GitHub Release # -# Note that a GitHub Release with this tag is assumed to exist as a draft -# with the appropriate title/body, and will be undrafted for you. +# Note that the GitHub Release will be created with a generated +# title/body based on your changelogs. name: Release permissions: @@ -40,14 +40,13 @@ permissions: # will be marked as a prerelease. on: pull_request: - # TEMPORARILY DISABLED FOR TESTING - only PR triggers will work - # workflow_dispatch: - # inputs: - # tag: - # description: Release Tag - # required: true - # default: dry-run - # type: string + workflow_dispatch: + inputs: + tag: + description: Release Tag + required: true + default: dry-run + type: string jobs: # Run 'dist plan' (or host) to determine what tasks we need to do @@ -55,9 +54,9 @@ jobs: runs-on: "ubuntu-22.04" outputs: val: ${{ steps.plan.outputs.manifest }} - tag: '' - tag-flag: '' - publishing: 'false' + tag: ${{ (inputs.tag != 'dry-run' && inputs.tag) || '' }} + tag-flag: ${{ inputs.tag && inputs.tag != 'dry-run' && format('--tag={0}', inputs.tag) || '' }} + publishing: ${{ inputs.tag && inputs.tag != 'dry-run' }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -82,7 +81,7 @@ jobs: # but also really annoying to build CI around when it needs secrets to work right.) - id: plan run: | - dist plan --output-format=json > plan-dist-manifest.json + dist ${{ (inputs.tag && inputs.tag != 'dry-run' && format('host --steps=create --tag={0}', inputs.tag)) || 'plan' }} --output-format=json > plan-dist-manifest.json echo "dist ran successfully" cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" @@ -98,7 +97,7 @@ jobs: # Let the initial task tell us to not run (currently very blunt) needs: - plan - if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }} + if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') || inputs.tag == 'dry-run' }} strategy: fail-fast: false # Target platforms/runners are computed by dist in create-release. @@ -138,13 +137,6 @@ jobs: fi - name: Install dist run: ${{ matrix.install_dist.run }} - # Install NASM for Windows builds (required by aws-lc-sys) - - name: Install NASM (Windows) - if: runner.os == 'Windows' - run: | - choco install nasm -y - echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - shell: pwsh # Get the dist-manifest - name: Fetch local artifacts uses: actions/download-artifact@v4 @@ -232,86 +224,163 @@ jobs: ${{ steps.cargo-dist.outputs.paths }} ${{ env.BUILD_MANIFEST_NAME }} # Determines if we should publish/announce - # host: - # needs: - # - plan - # - build-local-artifacts - # - build-global-artifacts - # # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine) - # if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} - # env: - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # runs-on: "ubuntu-22.04" - # outputs: - # val: ${{ steps.host.outputs.manifest }} - # steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false - # submodules: recursive - # - name: Install cached dist - # uses: actions/download-artifact@v4 - # with: - # name: cargo-dist-cache - # path: ~/.cargo/bin/ - # - run: chmod +x ~/.cargo/bin/dist - # # Fetch artifacts from scratch-storage - # - name: Fetch artifacts - # uses: actions/download-artifact@v4 - # with: - # pattern: artifacts-* - # path: target/distrib/ - # merge-multiple: true - # # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" - # - id: host - # shell: bash - # run: | - # dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json - # echo "artifacts uploaded and released successfully" - # cat dist-manifest.json - # echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" - # - name: "Upload dist-manifest.json" - # uses: actions/upload-artifact@v4 - # with: - # # Overwrite the previous copy - # name: artifacts-dist-manifest - # path: dist-manifest.json + host: + needs: + - plan + - build-local-artifacts + - build-global-artifacts + # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine) + if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + runs-on: "ubuntu-22.04" + outputs: + val: ${{ steps.host.outputs.manifest }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + submodules: recursive + - name: Install cached dist + uses: actions/download-artifact@v4 + with: + name: cargo-dist-cache + path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/dist + # Fetch artifacts from scratch-storage + - name: Fetch artifacts + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: target/distrib/ + merge-multiple: true + # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" + - id: host + shell: bash + run: | + dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json + echo "artifacts uploaded and released successfully" + cat dist-manifest.json + echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" + - name: "Upload dist-manifest.json" + uses: actions/upload-artifact@v4 + with: + # Overwrite the previous copy + name: artifacts-dist-manifest + path: dist-manifest.json + + publish-homebrew-formula: + needs: + - plan + - host + runs-on: "ubuntu-22.04" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PLAN: ${{ needs.plan.outputs.val }} + GITHUB_USER: "axo bot" + GITHUB_EMAIL: "admin+bot@axo.dev" + if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: true + repository: "portofcontext/homebrew-tap" + token: ${{ secrets.HOMEBREW_TAP_TOKEN }} + # So we have access to the formula + - name: Fetch homebrew formulae + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: Formula/ + merge-multiple: true + # This is extra complex because you can make your Formula name not match your app name + # so we need to find releases with a *.rb file, and publish with that filename. + - name: Commit formula files + run: | + git config --global user.name "${GITHUB_USER}" + git config --global user.email "${GITHUB_EMAIL}" + + for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith(".rb")] | any)'); do + filename=$(echo "$release" | jq '.artifacts[] | select(endswith(".rb"))' --raw-output) + name=$(echo "$filename" | sed "s/\.rb$//") + version=$(echo "$release" | jq .app_version --raw-output) + + export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" + brew update + # We avoid reformatting user-provided data such as the app description and homepage. + brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true + + git add "Formula/${filename}" + git commit -m "${name} ${version}" + done + git push + + publish-npm: + needs: + - plan + - host + runs-on: "ubuntu-22.04" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PLAN: ${{ needs.plan.outputs.val }} + if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} + steps: + - name: Fetch npm packages + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: npm/ + merge-multiple: true + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: | + for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith("-npm-package.tar.gz")] | any)'); do + pkg=$(echo "$release" | jq '.artifacts[] | select(endswith("-npm-package.tar.gz"))' --raw-output) + npm publish --access public "./npm/${pkg}" + done + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Create a GitHub Release while uploading all files to it - # TEMPORARILY DISABLED FOR TESTING - artifacts will only be uploaded to workflow artifacts - # announce: - # needs: - # - plan - # - host - # # use "always() && ..." to allow us to wait for all publish jobs while - # # still allowing individual publish jobs to skip themselves (for prereleases). - # # "host" however must run to completion, no skipping allowed! - # if: ${{ always() && needs.host.result == 'success' }} - # runs-on: "ubuntu-22.04" - # env: - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false - # submodules: recursive - # # Create a GitHub Release while uploading all files to it - # - name: "Download GitHub Artifacts" - # uses: actions/download-artifact@v4 - # with: - # pattern: artifacts-* - # path: artifacts - # merge-multiple: true - # - name: Cleanup - # run: | - # # Remove the granular manifests - # rm -f artifacts/*-dist-manifest.json - # - name: Create GitHub Release - # env: - # PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}" - # RELEASE_COMMIT: "${{ github.sha }}" - # run: | - # # If we're editing a release in place, we need to upload things ahead of time - # gh release upload "${{ needs.plan.outputs.tag }}" artifacts/* - # - # gh release edit "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --draft=false + announce: + needs: + - plan + - host + - publish-homebrew-formula + - publish-npm + # use "always() && ..." to allow us to wait for all publish jobs while + # still allowing individual publish jobs to skip themselves (for prereleases). + # "host" however must run to completion, no skipping allowed! + if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') && (needs.publish-npm.result == 'skipped' || needs.publish-npm.result == 'success') }} + runs-on: "ubuntu-22.04" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + submodules: recursive + # Create a GitHub Release while uploading all files to it + - name: "Download GitHub Artifacts" + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: artifacts + merge-multiple: true + - name: Cleanup + run: | + # Remove the granular manifests + rm -f artifacts/*-dist-manifest.json + - name: Create GitHub Release + env: + PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}" + ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}" + ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}" + RELEASE_COMMIT: "${{ github.sha }}" + run: | + # Write and read notes from a file to avoid quoting breaking things + echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt + + gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/* diff --git a/.gitignore b/.gitignore index 854e3e30..c073604a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,4 @@ *.iml .claude pctx.json -pctx-dev.jsonl -CLAUDE.md \ No newline at end of file +pctx-dev.jsonl \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..e69de29b diff --git a/Cargo.toml b/Cargo.toml index 66f408fb..7ceedace 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,6 @@ repository = "https://github.com/portofcontext/pctx" [workspace.dependencies] tracing = "0.1.41" thiserror = "2.0" -# windows-sys = "0.59" [workspace.lints.rust] unreachable_pub = "warn" diff --git a/crates/pctx/Cargo.toml b/crates/pctx/Cargo.toml index c6be05e0..4dd79040 100644 --- a/crates/pctx/Cargo.toml +++ b/crates/pctx/Cargo.toml @@ -108,3 +108,11 @@ workspace = true [package.metadata.dist] dist = true + +# System dependencies for cargo-dist to install +[package.metadata.dist.dependencies.apt] +libclang-dev = "*" +libc6-dev = "*" + +[package.metadata.dist.dependencies.chocolatey] +nasm = "*" diff --git a/dist-workspace.toml b/dist-workspace.toml index 8a21ab4e..1df46eda 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -5,12 +5,8 @@ members = ["cargo:."] [dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.30.2" -# Allow custom edits to CI files for testing -allow-dirty = ["ci"] # CI backends to support ci = "github" -# NOTE: NASM is manually installed in release.yml for Windows builds (required by aws-lc-sys) -# This can't be automated via cargo-dist system-dependencies yet # The installers to generate for each app installers = ["shell", "npm", "homebrew"] # The archive format to use for windows builds (defaults .zip) @@ -18,8 +14,7 @@ windows-archive = ".zip" # The archive format to use for non-windows builds (defaults .tar.xz) unix-archive = ".tar.gz" # Whether dist should create a Github Release or use an existing draft -# Temporarily disabled for testing Windows build -create-release = false +create-release = true # Whether CI should trigger releases with dispatches instead of tag pushes dispatch-releases = true # Which phase dist should use to create the GitHub release @@ -27,14 +22,16 @@ github-release = "announce" # Path that installers should place binaries in install-path = "~/.local/bin" # Which actions to run on pull requests -# Temporarily set to "upload" to test Windows build on PRs -pr-run-mode = "upload" +pr-run-mode = "plan" # Whether CI should include auto-generated code to build local artifacts build-local-artifacts = true # Target platforms to build apps for (Rust target-triple syntax) -# Temporarily testing Windows only -targets = ["x86_64-pc-windows-msvc"] -# targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] +targets = [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "x86_64-unknown-linux-gnu", + "x86_64-pc-windows-msvc", +] # Where to host releases hosting = "github" # Whether to install an updater program @@ -48,6 +45,4 @@ npm-scope = "@portofcontext" # A GitHub repo to push Homebrew formulas to tap = "portofcontext/homebrew-tap" # Publish jobs to run in CI -# Temporarily disabled for testing Windows build -# publish-jobs = ["homebrew", "npm"] -publish-jobs = [] +publish-jobs = ["homebrew", "npm"] From b13765bc940f01333848071b0c3145c8044709a0 Mon Sep 17 00:00:00 2001 From: Patrick Kelly Date: Fri, 5 Dec 2025 15:52:28 -0500 Subject: [PATCH 30/30] remove extra file --- CLAUDE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index e69de29b..00000000