Skip to content

Breaking change in schema fix should be major version bump #57

Description

@avrabe

Issue Summary

The recent schema generation fix (PR #56) introduces a breaking change but only bumps the patch version (0.10.0 → 0.10.1), which violates semantic versioning.

The Problem

PR #56 fixes the critical schema generation bug but makes multi-parameter tools fail to compile:

// This now fails to compile with our fix
fn my_tool(&self, name: String, count: Option<u32>) -> String

Breaking changes require MAJOR version bumps according to semver.

Current Situation

  • What it fixes: Critical bug where all schemas were empty
  • What it breaks: Multi-parameter tool patterns (compile errors)
  • Version bump: 0.10.0 → 0.10.1 (patch) ❌
  • Should be: 0.10.0 → 0.11.0 (major) or make it non-breaking

Proposed Solutions

Option 1: Make it Non-Breaking ✅ (Recommended)

  • Support both old multi-parameter AND new single-struct patterns
  • Single-struct gets full JsonSchema support (fixed)
  • Multi-parameter gets basic/fallback schema support (better than broken)
  • Add deprecation warnings for multi-parameter pattern
  • Breaking change in v0.12.0

Option 2: Accept Breaking Change

  • Change version to 0.11.0 (major bump)
  • Document clear migration path
  • Accept that users need to update immediately

Option 3: Hybrid Approach

  • Release 0.10.1 as hotfix with non-breaking implementation
  • Release 0.11.0 later with full breaking changes

Impact Assessment

Who is affected:

  • Users with multi-parameter tools (most examples, many real implementations)
  • Projects that can't immediately migrate parameter patterns

Severity:

  • 🔴 High: Breaks existing code compilation
  • 🟡 Medium: Migration path is straightforward
  • 🟢 Low: Old pattern was already broken (empty schemas)

Recommendation

Implement Option 1 to make the fix non-breaking:

  1. Keep the JsonSchema fix for single-struct pattern (works perfectly)
  2. Add fallback support for multi-parameter pattern (better than broken)
  3. Version stays at 0.10.1 (patch for bug fix)
  4. Add deprecation warnings to guide migration
  5. Plan breaking change for v0.12.0

This approach:

  • ✅ Fixes the critical bug immediately
  • ✅ Doesn't break existing code
  • ✅ Follows semantic versioning
  • ✅ Provides smooth migration path

Action Items

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions