Skip to content

refactor: clarify utility package contracts - #21

Merged
rasros merged 2 commits into
mainfrom
refactor/package-contracts
Nov 16, 2026
Merged

rasros merged 2 commits into
mainfrom
refactor/package-contracts

Conversation

@rasros

@rasros rasros commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Make arrays own shared empty arrays and hash own key mixing, so neither depends on collection internals.
  • Name primitive-list swap removal explicitly and separate derived map operations, storage inspection, packed-word helpers, and cooperative algorithms from container members.
  • Limit additive counters to add and load; keep exact replacement and update results on cells, including preservation of floating-point bits for zero updates.
  • Move identity and diagnostic APIs from platform into runtime and runtime.diagnostics, and make resource closure part of the CharSource contract.
  • Document package responsibilities, target availability, ownership and migration steps in docs/packages.md; update consumers, tests and ABI baselines. Keep BigInt as the existing backend typealiases.

Why

Utility packages need clear ownership and predictable contracts. This removes dependencies on another package's implementation details and gives representation-specific and budgeted operations explicit entry points.

This is a source- and binary-breaking API cleanup. Consumers must update the renamed methods and imports and rebuild with the library; the migration table lists each replacement.

Testing

  • ./gradlew check lintDocs --offline --continue --max-workers=2 -Pkotlin.compiler.execution.strategy=in-process — JVM/Linux Native library and consumer tests, benchmark adapter tests, lint, coverage and documentation checks passed.
  • Full-target ABI generation and comparison, including JS/Wasm compilation, passed.
  • Package dependency assertions and git diff --check passed.

@rasros
rasros merged commit 55cc744 into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant