Skip to content

v4.0.0

Latest

Choose a tag to compare

@gsdali gsdali released this 27 Nov 04:25
a76f1c0

v4.0.0: OCCTSwift on OCCT V8_0_2, with the hardened kernel as the default. A major by SemVer Rule 2. It is the tree of v4.0.0-rc.1 plus the release commit: Sources, Tests, Package.swift and Scripts are unchanged from the candidate, and only the README, docs/CHANGELOG.md, docs/SEMVER.md and docs/index.md differ.

.package(url: "https://github.com/SecondMouseAU/OCCTSwift.git", from: "4.0.0")

from: "4.0.0" resolves this release and never a pre-release. A package that pins exact: "4.0.0-beta.N" or exact: "4.0.0-rc.1" moves to from: "4.0.0".

What changed since v3.0.0

  • The kernel moves from OCCT V8_0_1 to V8_0_2 (tagged 2026-11-21) and is the hardened one: 51 carried patches (0010 to 0080, retired numbers absent), native and wasm, on the kernel-8.0.2-c1 pre-release. That tag is not a semver tag, so it does not appear in SwiftPM's or the Swift Package Index's version list; do not delete it, this tag's Package.swift points at it. The 51 are 14 thread-safety patches, 12 damaged-input hardening patches, 13 crash and hang guards, 11 wrong-answer fixes and one behaviour ahead of upstream (0059, fillets that meet exactly are built).
  • Kernel.flavour, Kernel.occtVersion and the kernel-fix ledger (Scripts/kernel-fixes.tsv): a program can ask which kernel it linked and which of the 60 recorded fixes it holds.
  • Builder crashes become refusals (#3516, #3518, #3519, #3522, #3523, #3524): FilletBuilder and ChamferBuilder contour and edge indices out of range, surfaceCount and simulatedSurfaceCount with no build or no surface data, and a radius change on a built contour answer a refusal or 0 instead of an uncatchable fault. A contour index of 0 or below used to read contour 1, and surfaceCount after reset() answered the stale count; both are behaviour rows in the register (#3521, #3517).
  • STEP files that start with a UTF-8 byte order mark load (#3529). Shape.edges() and Shape.measure() are linear in the edge count (#3526, #3527).
  • Additive API (#3559, #3560, #3561, #3562): Shape.splitWithFullHistory(atPlane:normal:) and Shape.fuseAllWithFullHistory(_:). split(atPlane:normal:) now cuts a shape that lies far from the plane's point: it used to return such a shape whole.
  • Kernel faults closed (#3506, #3509, patches 0079 and 0080): a pcurve circle of no radius no longer stops Shape.isValid, and a face without a surface no longer faults the Boolean self-interference check.
  • OCCT 8.0.2's own numerics move some answers; the behaviour rows are in docs/SEMVER.md under "What v4.0.0-rc.1 adds to the picture".

The per-change entries are in docs/CHANGELOG.md under ## v4.0.0.

Breaking, in docs/SEMVER.md with migrations

swift package diagnose-api-breaking-changes v3.0.0 --products OCCTSwift reports 190 breaking changes on this tree, and the register lists all of them with their migrations (it had 74 of those lines before the mechanical comparison of #3539; 116 more were found by the digester and a by-name symbol comparison). Against v4.0.0-beta.6 the digester reports none. The larger rows (the simd removal, the GD&T accessors and types, the BRepGraph and NLPlate families, Shape.splitDrafts) are in the table with their migrations. Read docs/SEMVER.md before upgrading from v3.x.

Kernel assets

  • OCCT.xcframework.zip: 149,618,785 bytes, sha256 729937d39d481b028492e5a8e4addee980084bee9e4047210c1a3b43f6ca88b9, the checksum: in Package.swift.
  • libOCCT-wasm.tar.gz: 40,298,959 bytes, sha256 11ebf764c151f289b68c5f9e8a63f2eb7f67a6feeb56024dddda7aeffcd939c9, the digest in Scripts/wasm-kernel-pin.txt.

Against v4.0.0-kernel.9, the last kernel (61 patches): ten patches retire because V8_0_2 absorbed them, three are rebased onto it, and none is new.

LTS preview

v4.0.0-lts.1 is a separate pre-release of the vanilla V8_0_2 kernel flavour (no carried patches). It is not part of v4.0.0. Pin it with exact: "4.0.0-lts.1". How the LTS flavour is carried after v4.0.0 is not decided (#3545).

Known open items

  • Flaky tests: a valid STEP export intermittently returns IFSelect_RetFail while other suites run (#3567, cause not measured), and an OCAF test that measures the shared malloc heap fails under load (#3568). The macOS CI job fails when swift test fails (#3565), so a flake turns it red and a re-run clears it.
  • The ThreadSanitizer gate cannot exit 0 on a good tree: the four data-exchange scenarios are #1403's registered expected-fail baseline, and one test aborts its child process under --sanitize=thread (#3566). The release criterion was that no scenario outside that baseline fails: 30 of 34 scenarios are clean.
  • Fillets and chamfers: the defect set tracked under #3334 is open.
  • Held until after v4.0.0: #2863 (an ASan-instrumented kernel), the permanent LTS mechanism (#3545), and every upstream OCCT submission.

Verification

Evidence is the release candidate's, on a tree whose Sources, Tests, Package.swift and Scripts are identical to this tag's.

  • Full swift test, ten runs on 9b6639ba5, kernel kernel-8.0.2-c1: 7 passed every test target and 3 had one failing test, on two different tests (the two flakes above). No crash, no hang, no signal.
  • ThreadSanitizer: Scripts/tsan-stress.sh run 30 of 34 scenarios clean, the four failures being the #1403 baseline; swift mode reports no ThreadSanitizer warning and one failing test (#3566).
  • Kernel parity (#3537): 418 probe and transcript pairs against the resolved kernel-8.0.2-c1 asset: 395 match, 13 match under their declared allowances, 5 acknowledged, 5 not reproducible by declaration, none differ.
  • Pins: the Package.swift checksum and the wasm pin equal the published digests; check-wasm-kernel-parity.py clean at 51 carried patches and 11 WASI patches; check-pinned-asset-patches.py --require-pinned-asset clean against the resolved asset.
  • CHANGELOG audited with --verify-transcribed; counts: count-operations.py derives 4,408 and agrees with every headline.
  • API digester on the tagged tree: 190 breaking changes against v3.0.0 (the register's number), none against v4.0.0-beta.6.
  • swiftGCS, the one downstream consumer the plan gates on, with its OCCTSwift dependency pinned to exact: "4.0.0-rc.1": a clean build and all four test products pass (18, 34, 27 and 385 tests, 464 in all).
  • CI on the candidate's merge commit: every job green, wasm included on its predecessor.