refactor(storage): deprecate LogicalDType, fromDType/toLogicalDType, logicalType getters and overloads (SKEEP-003 P0, S0.2b) - #1059
Merged
Conversation
…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>
Contributor
Author
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SKEEP-003 slice S0.2b (milestone M0 #1001, decision #13), the last Phase-0 step: with the two-way bridge (#1045), the
DTypewitness (#1050),Format(#1051) andAllocationSpec(#1053) in place, nothing new is written againstLogicalDType— so it is now deprecated, additively.@Deprecated(WARNING, ReplaceWith("DType"))onLogicalDType,LogicalDType.fromDType,DType.toLogicalDType(), thelogicalTypeproperties ofTensorStorage/StorageMemoryReport, theLogicalDTypeoverloads ofTensorStorageFactory(fromRawBytes,fromRawBytesOwned,fileBacked) andPackedBlockStorage.toTensorStorage(logicalType, …).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).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 forLogicalDType(checked on the JVM compile log).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