Skip to content

Remove LinkType trait, use LinkReference from platform-num#31

Merged
konard merged 8 commits intomainfrom
issue-30-9625e5cb45f3
Apr 14, 2026
Merged

Remove LinkType trait, use LinkReference from platform-num#31
konard merged 8 commits intomainfrom
issue-30-9625e5cb45f3

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented Apr 14, 2026

Summary

  • Breaking: Removed LinkType trait entirely — all trait bounds now use LinkReference from platform-num directly
  • Deleted src/link_type.rs (was a backward-compatible alias wrapping LinkReference)
  • Replaced all T: LinkType bounds with T: LinkReference across all traits
  • Replaced all funty() calls with from_byte() from LinkReference
  • Re-exported LinkReference publicly from platform_trees
  • Fully dropped direct num-traits dependencyplatform-num 0.8.0 re-exports all needed traits (per Numbers PR #147)
  • Upgraded platform-num from 0.6.0 to 0.8.0
  • Added u128 support via LinkReference

Migration guide

Before After
use platform_trees::LinkType use platform_num::LinkReference (or use platform_trees::LinkReference)
T: LinkType T: LinkReference
T::funty(n) T::from_byte(n)

Test plan

  • All existing tests pass (118 tests: 32 unit + 42 list + 35 iterative tree + 7 compatibility + 2 doc-tests)
  • Clippy clean with pedantic+nursery lints
  • cargo fmt --check passes
  • No remaining references to LinkType in source or tests
  • u128 now works as a link type via LinkReference
  • No direct num-traits dependency — everything comes through platform-num 0.8.0

Fixes #30

🤖 Generated with Claude Code

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #30
@konard konard self-assigned this Apr 14, 2026
Unify the trait hierarchy by making LinkType a supertrait of
LinkReference from platform-num 0.7.0, replacing the local funty()
method with from_byte() and re-exporting LinkReference publicly.

Fixes #30

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Replace LinkType trait with LinkReference from platform-num (Numbers) Replace LinkType trait with LinkReference from platform-num Apr 14, 2026
konard and others added 3 commits April 14, 2026 11:49
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review April 14, 2026 12:00
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $4.146063

📊 Context and tokens usage:

Claude Opus 4.6:

  • Context window: 103.9K / 1M (10%) input tokens, 19.7K / 128K (15%) output tokens

Total: (95.3K + 5.7M cached) input tokens, 19.7K output tokens, $3.930576 cost

Claude Haiku 4.5:

Total: (93.8K + 623.2K cached) input tokens, 7.2K / 64K (11%) output tokens, $0.215487 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (2883KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

We must remove all mentions of LinkType must breakchange it to LinkReference. Only LinkReference should stay, if some features are missing in Numbers required to do so report issue there. So no LinkType will longer exist, and doublet-rs will use only LinkReference.

@konard konard marked this pull request as draft April 14, 2026 12:14
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-14T12:14:03.784Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

BREAKING CHANGE: LinkType trait has been removed. All trait bounds
now use LinkReference from platform-num directly. Downstream code
should replace T: LinkType with T: LinkReference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title Replace LinkType trait with LinkReference from platform-num Remove LinkType trait, use LinkReference from platform-num Apr 14, 2026
@konard konard marked this pull request as ready for review April 14, 2026 12:18
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Changes per feedback

Per your comment, LinkType has been completely removed (breaking change):

  • Deleted src/link_type.rs entirely
  • All trait bounds changed from T: LinkType to T: LinkReference
  • All source files now import LinkReference from platform_num directly
  • No backward-compatible alias remains
  • All 32 tests + 2 doc-tests pass, clippy clean

CI: ✅ All checks passing

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $1.808517

📊 Context and tokens usage:

  • Context window: 66.9K / 1M (7%) input tokens, 11.1K / 128K (9%) output tokens

Total: (96.6K + 1.9M cached) input tokens, 11.1K output tokens, $1.808517 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Log file uploaded as Gist (1219KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

After linksplatform/Numbers#147 is applied use latest version of https://crates.io/crates/platform-num, now we can fully support LinkReference, and also fully drop num_traits dependency, as https://crates.io/crates/platform-num reexports everything.

If something is still missing - report bug at https://github.com/linksplatform/Numbers

@konard konard marked this pull request as draft April 14, 2026 13:08
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-14T13:08:34.689Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

platform-num 0.8.0 (Numbers PR #147) re-exports all num-traits traits,
so downstream crates no longer need a direct num-traits dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review April 14, 2026 13:11
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Changes per feedback (platform-num 0.8.0 upgrade)

Per your comment, upgraded platform-num from 0.7.0 to 0.8.0 (Numbers PR #147):

  • platform-num upgraded to 0.8.0 — includes re-exports of all num-traits traits
  • num-traits fully dropped as direct dependency — no longer appears in Cargo.toml or README.md "Depend on" section
  • Updated changelog entry to reflect 0.8.0 version
  • All 118 tests pass, clippy + fmt clean

The only dependency is now platform-num = "0.8.0", which transitively provides everything needed.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $1.231742

📊 Context and tokens usage:

  • Context window: 56.6K / 1M (6%) input tokens, 6.7K / 128K (5%) output tokens

Total: (44.8K + 1.6M cached) input tokens, 6.7K output tokens, $1.231742 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Log file uploaded as Gist (1015KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit ed83a99 into main Apr 14, 2026
13 checks 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.

Replace LinkType trait with LinkReference from platform-num (Numbers)

1 participant