Conversation
A build once left 252 files in the repository root — `ASN1.o`, `ASN1.dia`, `MuSig+Nonces.swiftdeps` and the like, 63 basenames times four extensions. The 63 match the shared sources of swift-secp256k1's `P256K` target one for one. Nothing ignored them, so a `git add -A` committed them and the commit had to be rewritten. These belong in `.build/` or DerivedData, and both are configured correctly: there is no `WorkspaceSettings.xcsettings` overriding the build location and Xcode's build-location defaults are unset. The cause is upstream. `P256K` takes its sources from a build-tool plugin's output directory, and SwiftPM bug #7930 then writes the per-file intermediates relative to the build process's working directory. SharedSourcesPlugin's own header documents the leak. Root-anchored patterns rather than bare globs: `*.o` would hide a file anywhere in the tree, and these only ever appear beside Package.swift. Verified both ways — the seven root spellings are ignored, the same extensions nested under Sources/ are not. No cleanup trap added to the build scripts. Neither compiles `P256K`: a `-dry-run` plan for `-scheme Supabase` contains no `P256K`, `libsecp256k1` or `SharedSourcesPlugin` entry, so a trap there would not fire on the real cause, and an unconditional root-level `find -delete` for globs as generic as `*.d` would remove untracked files the script never created.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 33062826035Coverage remained the same at 87.101%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
The following capabilities are marked
The following capabilities are marked
These may have been renamed, removed, or never registered. Please update the capability matrix. |
A build once left 252 files in the repository root —
ASN1.o,ASN1.dia,MuSig+Nonces.swiftdepsand the like, 63 basenames × 4 extensions. The 63 match the shared sources ofswift-secp256k1'sP256Ktarget one for one. Nothing ignored them, so agit add -Acommitted them and the commit had to be rewritten.Cause is upstream, not a misconfiguration here. These belong in
.build/or DerivedData, and both are configured correctly: there is noWorkspaceSettings.xcsettingsoverriding the build location, and Xcode'sIDEBuildLocationStyle/IDECustomBuildLocationTypedefaults are unset.P256Ktakes its sources from a build-tool plugin's output directory, and SwiftPM bug #7930 then writes the per-file intermediates relative to the build process's working directory.SharedSourcesPlugin's own header documents the leak and suggests a cleanupfind.Root-anchored, not bare globs.
*.owould hide a file anywhere in the tree; these only ever appear besidePackage.swift.git ls-files | grep -E '\.(o|d|dia|swiftdeps|swiftmodule)$'is empty, so nothing tracked is masked.Verified both directions:
ASN1.o,ASN1.d,ASN1.dia,ASN1.swiftdeps,MuSig+Nonces.swiftdeps,Foo.swiftmodulegit check-ignore -vSources/Probe/Nested.{o,d,dia,swiftdeps}git statusstill reports the directoryNo cleanup trap added to
scripts/test-docs.shorscripts/xcodebuild.sh, deliberately. Neither compilesP256K— a-dry-runplan for-scheme Supabasecontains noP256K,libsecp256k1orSharedSourcesPluginentry — so a trap there would look like a fix while never firing on the real cause. And the upstream command deletes on globs as generic as*.dat the repo root; a docs script silently removing untracked files it never created is a bad trade once these are ignored.The exact trigger is still not reproducible on demand, which is the one loose end here. Everything tried, none of which leaked a single file:
swift build --build-tests, recompiling all 63P256KsourcesprebuildCommandswift package dump-symbol-graph./scripts/test-docs.shin isolationswift buildwith.build/…/debug/P256K.builddeleted (coldP256K)dump-symbol-graphwith theindex-buildandswift-dce-indexP256K.builddirs deletedSo the ignore rules are the fix that holds regardless: the leak is real and has recurred several times during unrelated work, but nothing identifies a command to hang a targeted cleanup off. That is also the second reason not to add a trap to a specific script — there is no evidence any particular script is the one that leaks.