Skip to content

refactor(storage): deprecate LogicalDType, fromDType/toLogicalDType, logicalType getters and overloads (SKEEP-003 P0, S0.2b) - #1059

Merged
michalharakal merged 1 commit into
developfrom
feature/1014-logicaldtype-deprecate
Aug 23, 2026
Merged

michalharakal merged 1 commit into
developfrom
feature/1014-logicaldtype-deprecate

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Summary

SKEEP-003 slice S0.2b (milestone M0 #1001, decision #13), the last Phase-0 step: with the two-way bridge (#1045), the DType witness (#1050), Format (#1051) and AllocationSpec (#1053) in place, nothing new is written against LogicalDType — so it is now deprecated, additively.

  • @Deprecated(WARNING, ReplaceWith("DType")) on LogicalDType, LogicalDType.fromDType, DType.toLogicalDType(), the logicalType properties of TensorStorage / StorageMemoryReport, the LogicalDType overloads of TensorStorageFactory (fromRawBytes, fromRawBytesOwned, fileBacked) and PackedBlockStorage.toTensorStorage(logicalType, …).
  • Nothing removed: the primary constructors keep LogicalDType (a data-class constructor cannot change compatibly) and every shim delegates to the dtype-first API; removal is scheduled for the next major (deprecate-don't-delete).
  • The files that implement the legacy surface (LogicalDType.kt, LogicalDTypeBridge.kt, TensorStorage.kt, StorageMemoryReport.kt, TensorStorageFactory.kt, PackedBlockStorage.kt, StorageSpec.kt) and the 16 tests that keep it covered carry a file-level @Suppress("DEPRECATION") with the reason; the rest of the build is deprecation-warning-free for LogicalDType (checked on the JVM compile log).
  • No BCV change (annotations are not part of the dumps); no CHANGELOG edit.

Re-opened against develop (the stacked PR #1058 was auto-closed when its base branch was deleted on merge); same single commit, gate results in #1058 and below.

Test plan

Full local gate (scripts/pr-gate.sh, JDK 25); results in the first comment. Targeted: lang-core storage/types + io-gguf + io-safetensors jvmTest 503/503.

Closes #1014

🤖 Generated with Claude Code

…the logicalType getters and overloads (SKEEP-003 P0, decision #13)

Milestone M0 (#1001), last Phase-0 step: with the two-way bridge (#1006),
the DType witness (#1007), Format (#1008) and AllocationSpec (#1009) in
place, nothing new is written against LogicalDType. It is now
@deprecated(WARNING, ReplaceWith DType) together with
LogicalDType.fromDType, DType.toLogicalDType(), the logicalType
properties of TensorStorage / StorageMemoryReport, the LogicalDType
overloads of TensorStorageFactory (fromRawBytes, fromRawBytesOwned,
fileBacked) and PackedBlockStorage.toTensorStorage(logicalType, …).

Nothing is removed: the primary constructors keep LogicalDType (a data
class constructor cannot change compatibly) and every shim delegates to
the dtype-first API; removal is scheduled for the next major. The files
that implement the legacy surface and the 16 tests that keep it covered
carry a file-level @Suppress("DEPRECATION") with the reason.

No BCV change (annotations are not part of the dump); no CHANGELOG edit.

Closes #1014

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@michalharakal

Copy link
Copy Markdown
Contributor Author

Gate results for this commit (eda8cad) are on the auto-closed #1058: full scripts/pr-gate.sh green on the identical tree (jvmTest 6m29s · apiCheck · JS/Wasm 2m36s · linuxX64 1m30s · assemble 2m10s · Java API tests), plus a --quick confirmation after the chain rebase.

@github-actions

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-1059 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

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.

[S0.2b] P0: deprecate LogicalDType (ReplaceWith → DType), logicalType getters; keep primary ctors until next major

1 participant