chore(#118): bump OCCTSwift floor to 3.0.0 - #119
Merged
Conversation
Two breaking changes, both compile errors: - Selector.SubShapeType.compsolid renamed .compSolid, consolidating four drifted Swift mirrors of TopAbs_ShapeEnum onto ShapeType. Zero source changes needed: this repo already spelled it ShapeType.compSolid. - Shape.bounds/.size/.center, Wire.bounds, Edge.bounds, Face.bounds become Optional instead of fabricating (0,0,0)-(0,0,0) for a shape with no bounding box. Every call site now unwraps: QueryTopology/LoadBrep/ MeasureDeviation/RenderPreview/Metrics throw a named ScriptError on a nil bounding box (a real error on a loaded BREP, not a state to paper over with ?? .zero); the two recipe edge-selector predicates return false on a nil bounds rather than fabricate a match. Added Tests/OcctkitCommandTests/OptionalBoundsTests.swift, a regression suite that constructs a genuinely void shape (the intersection of two disjoint boxes) and asserts LoadBrepCommand.buildResponse and MeasureDeviationCommand.defaultDeflection throw rather than fabricate a zero-size box. swift build, swift test (12/12), and the recipe smoke suite (all 7 recipes, matching their reference output.brep exactly) all verified clean locally against the real v3.0.0 sibling checkout. The rest of the cohort (OCCTSwiftTools/Mesh/IO/AIS) has not yet released an OCCTSwift-3.0.0-compatible version, and OCCTSwiftAIS has 3 of its own unfixed .bounds call sites, so neither a fresh clone/CI run nor an as-is local sibling build can resolve the full graph yet. Package.resolved is left untouched, matching the #111 precedent. See the new OKF decision entry for the full detail; this repo's release should wait for the cohort, same situation as the 2.0.0 bump. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 task
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (14 files)
Reviewed by nemotron-3-ultra-550b-a55b:free · Input: 190.7K · Output: 10.6K · Cached: 397.4K |
gsdali
added a commit
that referenced
this pull request
Aug 19, 2026
Package.resolved was last regenerated well before the 2.0.0/3.0.0 bumps (occtswift pinned at 1.17.0, occtswiftais at 1.3.1) and was deliberately left untouched across both floor-bump PRs (#111, #119) since remote resolution was blocked either way at the time. Now that the whole cohort has shipped 3.0.0-compatible releases, that staleness became actively wrong: SwiftPM's resolver treats an existing Package.resolved as a starting point and keeps a pinned version if it still satisfies every declared constraint, even if the *manifest* constraints don't capture real source compatibility. occtswiftais@1.3.1 satisfies OCCTSwiftTools's `>= 1.6.1` constraint just fine on paper; its actual Dimension.swift/AreaSelection.swift source still calls the now-Optional `.bounds` the old, unwrapped way. Manifest-level resolution can't see that, so main's tests/verbs CI kept failing post-v1.6.2 release even after OCCTSwiftAIS v1.3.2 (with the real fix) was published. Verified genuinely fresh (no local sibling checkouts, no stale lockfile) in an isolated /tmp copy of this repo: `swift package resolve` + `swift build --product occtkit` both clean, resolving occtswift 3.0.0 / occtswiftais 1.3.2 / occtswifttools 1.6.4 / occtswiftmesh 1.7.5 / occtswiftio 1.7.8 / occtswiftviewport 1.1.27 throughout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 task
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.
What & why
OCCTSwift v3.0.0 shipped
2026-08-18 with two breaking changes.
Selector.SubShapeType.compsolidrenamed.compSolidneeded no source change here (this repo already used the surviving
ShapeType.compSolidspelling).
Shape.bounds/.size/.center,Wire.bounds,Edge.bounds,Face.boundsbecameOptional(they used to fabricate(0,0,0)-(0,0,0)for a shape with no bounding box,indistinguishable from a genuine zero-size shape at the origin). Every call site here now
unwraps:
QueryTopology/LoadBrep/MeasureDeviation/RenderPreview/Metricsthrow a namedScriptErroron anilbounding box; the two recipe edge-selector predicates returnfalserather than fabricate a match.
Closes #118
This is not ready to release yet, by design. The rest of the cohort
(OCCTSwiftTools/Mesh/IO/AIS) has not shipped an OCCTSwift-3.0.0-compatible release, and
OCCTSwiftAIS additionally has 3 of its own unfixed
.boundscall sites, so CI on this PR isexpected to fail (remote graph resolution) until they catch up — same situation as the 2.0.0
bump (see the new OKF decision entry,
occtswift-3.0.0-floor-bump-blocked-on-cohort-releases.md,for the full detail and how this was verified anyway: a local build with a temporary,
reverted-after-verification patch to the AIS sibling checkout). Merge review doesn't require a
resolvable graph, only the eventual release tag does.
Checklist
Tests/OcctkitCommandTests/OptionalBoundsTests.swiftconstructs a genuinely void shape(the intersection of two disjoint boxes) and asserts the new throw paths fire instead of
fabricating a zero-size box.
Notes for the reviewer
swift build,swift build --build-tests,swift test(12/12), andScripts/recipe-check.shagainst a release build (all 7 recipes match their referenceoutput.brepexactly,Δvol 0.00e+00) all verified clean locally against the real v3.0.0OCCTSwift sibling checkout.
Package.resolvedis intentionally left untouched, matching the Bump OCCTSwift floor to 2.0.0 #111 precedent: regeneratingit now would either commit path-relative local-machine state or fail outright against remote.
repin — tracked in the OKF decision entry linked above.