Skip to content

Conversation

@Peefy
Copy link
Contributor

@Peefy Peefy commented May 10, 2022

Fix: kclvm compiler pkgpath prefix replace dot.

  • Before
    @pkgpath.model -> .model
  • After
    @pkgpath.model -> model

@Peefy Peefy requested a review from zong-zhe May 10, 2022 08:29
@zong-zhe zong-zhe merged commit 93d55ff into main May 10, 2022
@chai2010 chai2010 deleted the dev/peefy/internal branch May 13, 2022 10:34
eminaktas pushed a commit to eminaktas/kcl that referenced this pull request Oct 17, 2024
fix opensource security issue of yaml.load()
eminaktas pushed a commit to eminaktas/kcl that referenced this pull request Oct 17, 2024
refactor: use kpm to package and run.
Peefy pushed a commit that referenced this pull request Oct 30, 2025
* docs: add CLAUDE.md for AI assistant context

Add comprehensive repository overview documentation to help AI assistants
understand the KCL codebase structure, architecture, and development workflow.

This document includes:
- Project purpose and key use cases
- Repository structure and organization
- Technology stack and dependencies
- Architecture and compilation pipeline
- Build system and testing infrastructure
- Development workflow and common tasks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* chore: update Rust dependencies to latest compatible versions

Updated 286 Rust package dependencies using `cargo update` to bring
them to their latest semver-compatible versions.

## Build & Test Status
- ✅ Build: Successful (all warnings are from generated code)
- ✅ Tests: 172 passing
- ⚠️  9 LSP tests failing (pre-existing, not introduced by this update)

## Pre-existing Test Failures
The following LSP tests were already failing on main branch before
this dependency update:
- completion::tests::complete_unimport_schemas
- completion::tests::import_external_pkg_test
- tests::complete_import_external_file_e2e_test
- tests::konfig_completion_test_main
- tests::konfig_goto_def_test_base
- tests::konfig_goto_def_test_main
- tests::konfig_hover_test_main
- tests::pkg_mod_test
- tests::test_lsp_with_kcl_mod_in_order

All failures are related to external package/module resolution in the
LSP component and should be addressed separately.

## Notable Dependency Updates
- tokio: 1.39.2 → 1.48.0
- serde: 1.0.204 → 1.0.228
- clap: 4.5.11 → 4.5.50
- anyhow: 1.0.86 → 1.0.100
- regex: 1.10.5 → 1.12.2
- rustls: 0.23.12 → 0.23.34
- And 280+ other dependencies

Closes #1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* fix: update serde_json version constraint for GCP SDK compatibility

Changed serde_json from exact pin (= 1.0.115) to compatible range (^1.0.132)
to support Google Cloud Platform Storage SDK requirements.

## Changes
- runtime/Cargo.toml: Updated serde_json from "= 1.0.115" to "^1.0.132"
- Current version: 1.0.145 (already at latest from previous cargo update)

## Rationale
- GCP Storage SDK (google-cloud-storage) requires serde_json ^1.0.132
- Previous exact pin at 1.0.115 was below minimum required version
- New constraint allows updates while maintaining GCP compatibility

## Testing
- ✅ cargo build --release: Success
- ✅ cargo test --package kclvm-runtime: 131 tests passed

Part of #3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* chore: upgrade thiserror from 1.0 to 2.0

Updated thiserror dependency to version 2.0 for improved error handling
and to eliminate duplicate versions in dependency tree.

## Changes
- error/Cargo.toml: Updated thiserror from "1.0.61" to "2.0"
- Cargo.lock: Now uses thiserror 2.0.17

## Breaking Changes Review
Reviewed thiserror 2.0 changelog - no breaking changes affect our usage:
- No raw identifier syntax (`{r#type}`) in use
- No numerical tuple field access conflicts
- All error derives remain compatible

## Testing
- ✅ cargo build --release: Success
- ✅ cargo test --package kclvm-error: Success

## Benefits
- Consolidates dependency versions (was using both 1.x and 2.x)
- Access to latest improvements and bug fixes
- Better error message formatting

Part of #3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* feat: migrate from encoding to encoding_rs

Replaced the unmaintained `encoding` crate with the modern, actively
maintained `encoding_rs` crate for character encoding operations.

## Changes
- runtime/Cargo.toml: Replaced encoding 0.2.33 with encoding_rs 0.8
- runtime/src/encoding/mod.rs: Rewrote to use encoding_rs API
  - Use Encoding::for_label() for encoding lookup
  - Use encode() method with error detection
  - Maintain same public API (encode_text function)

## Benefits
- ✅ Actively maintained (used by Firefox/Gecko)
- ✅ Better performance
- ✅ More comprehensive encoding support
- ✅ Follows WHATWG Encoding Standard
- ✅ Regular security updates

## Migration Details
Old API (encoding):
```rust
encodings().find(|e| e.name() == name)
    .encode(value, EncoderTrap::Strict)
```

New API (encoding_rs):
```rust
Encoding::for_label(name.as_bytes())
    .encode(value) // returns (Cow<[u8]>, Encoding, had_errors)
```

## Testing
- ✅ cargo build --release: Success
- ✅ cargo test --package kclvm-runtime: 131 tests passed
- ✅ All encoding functionality verified

Part of #3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* chore: pin thiserror and encoding_rs to exact versions

Pin dependency versions for stability and reproducibility.

## Changes
- error/Cargo.toml: Pin thiserror to "2.0.17"
- runtime/Cargo.toml: Pin encoding_rs to "0.8.35"

## Rationale
Exact version pins ensure:
- Reproducible builds across environments
- Explicit control over when to upgrade
- Stability for production deployments

## Testing
- ✅ cargo build --release: Success
- ✅ cargo test (runtime & error): 131 tests passed

Part of #3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* chore: pin serde_json to GCP SDK compatible version

Pin serde_json to 1.0.132, the minimum version required by Google Cloud
Platform Storage SDK.

## Changes
- runtime/Cargo.toml: Pin serde_json to "1.0.132"
- Cargo.lock: Updated to use compatible version (1.0.145)

## Rationale
- GCP Storage SDK requires serde_json >= 1.0.132
- Pin ensures explicit compatibility with GCP SDK
- Version 1.0.145 satisfies the 1.0.132 constraint

Part of #3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Turner <jturner@hemmer.io>

* style: apply cargo fmt formatting

Signed-off-by: John Turner <jturner@hemmer.io>

* fix: pin inkwell to compatible commit to fix build

The cargo update had updated inkwell to a newer commit (0f8d2d6c) that
removed the inkwell_internals package, breaking the build. This pins
inkwell back to the original working commit (4030f764) while keeping
all other dependency updates.

Signed-off-by: John Turner <jturner@hemmer.io>

* fix: downgrade home crate to 0.5.9 for Rust 1.84.1 compatibility

The cargo update had updated home to 0.5.12 which requires edition2024
and Rust 1.85+. This downgrades it to 0.5.9 which is compatible with
the CI's Rust 1.84.1.

Tested with Rust 1.84.1 - all checks pass.

Signed-off-by: John Turner <jturner@hemmer.io>

---------

Signed-off-by: John Turner <jturner@hemmer.io>
Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants