Skip to content

Dependencies Update#10

Open
day01 wants to merge 8 commits intoValensas:masterfrom
habitatai:chore/deps-update
Open

Dependencies Update#10
day01 wants to merge 8 commits intoValensas:masterfrom
habitatai:chore/deps-update

Conversation

@day01
Copy link
Copy Markdown

@day01 day01 commented Jul 30, 2025

📋 Overview

This PR updates deprecated and outdated dependencies to their modern equivalents. The main driver was migrating away from serde_yaml (deprecated) and updating to the latest tonic ecosystem packages. As a side effect, the API was simplified by removing redundant parameters.

What Changed

🏗️ API Changes (Required by Dependency Updates)

Before (0.13):

// Old API with tonic-build
tonic_buf_build::compile_from_buf(tonic_build::configure(), None)?;

After (0.14):

// New API with tonic-prost-build
tonic_buf_build::compile_from_buf()?;

Dependencies Migration

  • Migrated from tonic-build to tonic-prost-build 0.14 - Following the tonic ecosystem's evolution
  • Replaced deprecated serde_yaml with serde_yaml_ng - The original serde_yaml is no longer maintained
  • Updated uuid from 1.10 to 1.17 - Latest stable version with security improvements
  • Updated tonic to 0.14 - Latest version with tls-webpki-roots feature

Examples

Added 4 comprehensive examples showing different use cases:

  1. buf-yaml - Basic usage with buf.yaml
  2. buf-work-yaml - Buf workspace support
  3. buf-yaml-advanced - Advanced configuration with file descriptors and mock server
  4. buf-yaml-custom-dir - Custom directory usage (monorepo scenarios)

API Functions Added

  • compile_from_buf() - Simplified basic usage
  • compile_from_buf_workspace() - Simplified workspace usage
  • compile_from_buf_with_builder_config() - Advanced configuration via closure
  • compile_from_buf_with_config() - Custom directory support
  • compile_from_buf_workspace_with_config() - Workspace + custom directory
  • compile_from_buf_with_builder_and_buf_config() - Full configuration control

Documentation

  • Migration guide (MIGRATION_0.13-0.14.md) with clear before/after examples

Why These Changes?

1. Critical Dependency Updates

  • serde_yaml is officially deprecated and no longer receives security updates
  • uuid was several versions behind (1.10 vs 1.17)
  • tonic ecosystem moved to 0.14 with important security fixes

2. Forced API Changes

  • Migration from tonic-build to tonic-prost-build required function signature changes
  • Since we had to break the API anyway, removed redundant parameters
  • Added new functions but kept the same core functionality

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