fix: raise OCCTSwiftIO cap to >=1.7.5, unblocking coexistence with OCCTSwiftTools#81
Merged
Merged
Conversation
…CTSwiftTools OCCTSwiftIO was capped to `.upToNextMinor(from: "1.0.0")` (>=1.0.0, <1.1.0) since #69, to dodge the heavy mesh-IO stack (SwiftPMX/SwiftX/ThreeMF/ SwiftGLTF) that OCCTSwiftIO 1.1.0+ pulls in via a MeshIO target. But OCCTSwiftTools >=1.6.1 now requires OCCTSwiftIO >=1.7.0 directly, so any consumer depending on both OCCTSwiftScripts and OCCTSwiftTools at once (e.g. OCCTMCP) hit an unsatisfiable version conflict. Checked OCCTSwiftIO 1.7.5's manifest for a narrower product that would preserve the cap's intent: it now ships two library products, OCCTSwiftIO and MeshIO, but the OCCTSwiftIO target has an unconditional target dependency on MeshIO — not a product a consumer can decline. So there is no BREP/STEP-only product to opt into; lifting the cap does mean accepting the full mesh-IO stack transitively. Raised the floor to >=1.7.5 (open range, occtDep instead of occtDepUpToNextMinor) rather than the bare 1.7.0 Tools needs: 1.7.5 is OCCTSwiftIO's own TopologyGraph -> BRepGraph rename (mirroring OCCTSwift 1.15.0's rename), and 1.7.1-1.7.4 are pure OCCTSwift-floor repins for crash/hang fixes already required transitively via our own OCCTSwift >=1.15.0 floor. Removed the now-unused occtDepUpToNextMinor helper. Closes #80
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Package.swiftcappedOCCTSwiftIOto.upToNextMinor(from: "1.0.0")(>=1.0.0, <1.1.0) since #69, to dodge the heavy mesh-IO stack (SwiftPMX/SwiftX/ThreeMF/SwiftGLTF) that OCCTSwiftIO 1.1.0+ pulls in via aMeshIOtarget. But OCCTSwiftTools >=1.6.1 now requires OCCTSwiftIO >=1.7.0 directly, so any consumer depending on both OCCTSwiftScripts and OCCTSwiftTools at once (e.g. OCCTMCP, forScriptHarness/DrawingComposerand theBRepGraphbridge respectively) hit an unsatisfiable version conflict:OCCTMCP currently works around this by pinning OCCTSwiftScripts back to 1.4.1 (and OCCTSwiftTools to 1.3.1, and adding its own root-level OCCTSwiftIO cap) — meaning it's stuck on a pre-BRepGraph-rename
ScriptHarness/DrawingComposer. That workaround lives entirely in OCCTMCP's own manifest and is unaffected by this PR; OCCTMCP will need a separate follow-up change to actually take advantage of the raised floor.Was a narrower OCCTSwiftIO product available?
Checked OCCTSwiftIO 1.7.5's
Package.swiftfor a way to keep the cap's original intent (BREP/STEP core only, no mesh formats) via product-level granularity now that OCCTSwiftIO has split into two library products:No — the
OCCTSwiftIOtarget itself has an unconditional target dependency onMeshIO, not a product boundary a consumer can opt out of. Depending on just theOCCTSwiftIOproduct still resolves and checks out the fullSwiftPMX/SwiftX/ThreeMF/SwiftGLTFstack (confirmed by both builds below, which show all of them compiling). There is no BREP/STEP-only product to depend on instead — lifting the cap does mean accepting that stack transitively, which is the real tradeoff this PR accepts. (For what it's worth, grepping OCCTSwiftIO's own source shows none of its files actuallyimport MeshIO— the target dependency looks vestigial on OCCTSwiftIO's side — but that's a separate, out-of-scope cleanup for that repo, not something this PR can fix from the consumer side.)The fix
occtDepUpToNextMinor("OCCTSwiftIO", from: "1.0.0")→occtDep("OCCTSwiftIO", from: "1.7.5")occtDepUpToNextMinorhelper (no other dependency used it).TopologyGraph->BRepGraphrename (mirroring OCCTSwift 1.15.0's rename, already required by this repo since rename: TopologyGraph -> BRepGraph, bump OCCTSwift floor to 1.15.0 #79), and 1.7.1-1.7.4 are pure OCCTSwift-floor repins for OCCT kernel crash/hang fixes already required transitively via our own OCCTSwift >=1.15.0 floor — no reason to admit an older OCCTSwiftIO minor.README.mdRequirements table andCLAUDE.md's dependency writeup to match (same convention rename: TopologyGraph -> BRepGraph, bump OCCTSwift floor to 1.15.0 #79 followed).Package.resolved.Cross-graph verification (the actual regression test for this bug)
A solo
swift buildof OCCTSwiftScripts wouldn't have caught the original conflict — it only appears when two consumers with different transitive OCCTSwiftIO requirements meet in one graph. So I built a throwaway root package depending on both this fixed OCCTSwiftScripts (via a local path override to this branch) and OCCTSwiftTools (from GitHub, latest), mirroring OCCTMCP's real shape:Built and resolved in an isolated clone (no sibling OCCT-family checkouts nearby, so every dependency resolved via its real URL + version constraint, not a local path override) — this exercises SwiftPM's real version resolver, the exact mechanism the original bug broke.
Result:
swift package resolveandswift buildboth succeed.Package.resolvedpins:occtswiftio→ 1.7.5 (satisfies both this repo's new>=1.7.5floor and OCCTSwiftTools 1.6.1's>=1.7.0floor simultaneously)occtswifttools→ 1.6.1 (latest)occtswift→ 1.15.0,occtswiftais→ 1.3.1,occtswiftviewport→ 1.1.26,occtswiftmesh→ 1.1.6 (all latest-compatible)Test plan
All run in an isolated clone with no sibling OCCT checkouts nearby, so every dependency resolved via URL + version (not a local path shortcut):
swift package resolve(solo, this repo) — resolves OCCTSwiftIO at 1.7.5swift build— clean, 0 errors, 0 warningsswift build --build-tests— clean, 0 errors, 0 warningsswift test— 3/3 tests pass (DrawingComposerTests)swift package resolve+swift build, Scripts+Tools together) — succeeds, OCCTSwiftIO lands on 1.7.5, 0 errors, 0 warningsCloses #80