Skip to content

CoreDataEvolution 0.9.6

Latest

Choose a tag to compare

@fatbobman fatbobman released this 05 Nov 00:56

Changes

  • Added the project-wide integer64SwiftType setting to cde-tool generate and validate, with matching --integer64-swift-type Int64|Int options. Int64 remains the default.
  • In Int mode, generation uses Int, conformance validation accepts both Int and existing Int64 declarations for ordinary Integer 64 attributes, and exact validation requires Int. Integer 16/32 and custom-storage rules retain their existing matching behavior.
  • Ordinary macro-generated Int accessors now perform exact conversion and terminate with a descriptive message if a stored value cannot fit the target's Int. Optional accessors distinguish absence from an unrepresentable value.
  • Added one compile-time warning per @PersistentModel using ordinary Int attributes on targets with 32-bit Int, including relevant watchOS architectures. The warning lists affected properties; 64-bit targets do not warn.
  • Expanded the swift-syntax dependency range to 600.0.0..<605.0.0, allowing the 604 series.
  • Updated the tooling guide, README, DocC, config scaffolds, and tests. Legacy Integer 64 mappings remain supported; conflicts with the new setting are reported explicitly.

Configuration

Add the setting to the corresponding sections of your existing project config:

{
  "generate": { "integer64SwiftType": "Int" },
  "validate": { "integer64SwiftType": "Int" }
}

The persistent Core Data type remains Integer 64. Keep Int64 when the full stored range must be available on every target. No minimum deployment targets have changed.

Validation

  • All 369 tests passed in the public release checkout with Apple Swift 6.4.2 and swift-syntax 604.0.0, with Core Data concurrency checking enabled. The development checkout also passed with swift-syntax 603.0.2.
  • The generated-model validation and external consumer build/run passed.
  • Macro-emitted warning declarations were compiled for both arm64_32 and arm64 watchOS targets and the macOS host. This is a compile check, not watchOS device testing.

Command-line Tool

The prebuilt cde-tool asset is for macOS on Apple silicon (arm64). It requires macOS 12+ and is not Developer ID-signed or notarized. Other environments can build the CLI from source. version.json records the source commit, toolchain, dependency versions, and minimum macOS version; SHA256SUMS covers the binary archive and metadata.