Skip to content

v1.8.0

Latest

Choose a tag to compare

@gsdali gsdali released this 22 Aug 01:07

Added

DirectoryWatcher, a public kqueue-backed file and directory watcher (#42 / #43). New public API, hence the minor bump.

let watcher = DirectoryWatcher(url: dir) { /* something changed */ }
watcher.start()

It lives here rather than in OCCTSwiftViewport because OCCTSwiftViewport is deliberately OCCT-free and is a Metal renderer: a file watcher is not a rendering concern. OCCTSwiftIO is the file-I/O package and is already a dependency of every interested party, so nothing gained a new dependency edge to reach it.

Why this release exists now

OCCTSwiftInteraction's main could not resolve without it. The agent-selection bridge (OCCTSwiftInteraction#16) needs DirectoryWatcher to notice a new highlight_requests/<id>.json without polling, and pinned this package to the unreleased issue-42-directory-watcher branch as a stopgap. That branch was deleted when #43 merged, which is the correct thing to do with a merged branch and also the moment the stopgap stopped working:

error: could not find a branch named 'issue-42-directory-watcher'
       in https://github.com/SecondMouseAU/OCCTSwiftIO.git

Tagging the API is what lets that consumer move back to a version pin. Worth remembering as a pattern: a branch pin is a promise to come back, and deleting the branch on merge collects that debt immediately rather than eventually.

Also since v1.7.8

  • Every dependency resolves from its published URL, never from a ../<name> sibling checkout (ecosystem#51). A path dependency carries no version requirement, so SwiftPM compiled whatever was checked out next door and dropped the pin from Package.resolved entirely.
  • swift build and swift test now run in CI on every push and PR (#40). swift build alone never compiles test targets, so the previous setup could not see a test that failed to build.

CI green on the DirectoryWatcher merge: code-style and tests both pass.