Proto commits in kcl-lang/kcl

These 72 commits are when the Protocol Buffers files have changed:

Commit:e40de86
Author:Peefy
Committer:GitHub

feat(api): LoadPackage info fields, FormatTestReport and code generation RPCs (#2209) LoadPackageResult gains three fields sourced from the existing loader pipeline: imports (per-file direct import graph read from the parser dep cache, specifiers as written recovered from the AST), kcl_mod (parsed kcl.mod manifest of the package root) and apps (application directories under the root). Together they replace the removed ListDep* RPCs for language bindings. FormatTestReport renders a TestResult as a pretty report byte-identical to kcl-go's PrettyReporter (new PrettyReporter in kcl-tools testing, plus a deterministic coverage block), so every binding prints identical reports. GenerateToml, GenerateKcl, GenerateOpenAPI, GenerateProto and GenerateDoc RPCs generate TOML from evaluated results, KCL from JSON/YAML/TOML data, and OpenAPI v3/v2 specs, proto3 definitions and Markdown/OpenAPI/ JSON-Schema docs from package schemas via a shared schema-type extraction refactored out of get_schema_type_mapping_under_path. Signed-off-by: Peefy <peefy@qq.com> Co-authored-by: Peefy <peefy@qq.com>

Commit:65af68d
Author:Peefy
Committer:GitHub

feat(api): add sourcemap_output to ExecProgramArgs for Source Map v3 requests (#2204) The runtime has been able to emit a Source Map v3 document for the generated YAML since v0.13.0, but only the libkcl CLI could request it through the settings file. Expose the request through the cross-language API by adding an optional sourcemap_output field to ExecProgramArgs: the runtime records the generated-YAML-to-KCL-source mapping, returns it in ExecProgramResult.sourcemap and writes it to the given path. Add a C API test covering the new field. The field is declared optional so unset requests keep sourcemap_output unset on the runner side and no source map is generated. Co-authored-by: Peefy <peefy@qq.com>

Commit:77602f2
Author:Peefy

feat(api): drop KclService.ListDepFiles — function was unused by every caller The previous commit registered `KclService.ListDepFiles` as the first real server-side implementation of the RPC. After reviewing the wider KCL ecosystem (kcl-go, kpm, kcl CLI), it turns out no downstream consumer ever talks to this RPC: * `kcl-go` carries its own parallel `pkg/tools/list/list.go::ListDepFiles` that walks the package locally and bypasses the gRPC stub entirely (`UnimplementedKclServiceServer.ListDepFiles` was never wired up). * `kpm` and `kcl-lang-cli` embed the proto types but have no code paths that invoke them. * `vet/validator.rs::expand_kcl_path` already implements near-identical package-walking logic for the CLI vet tool. Removing now keeps the spec lean and avoids carrying a "definition-with- no-real-caller" RPC forward. Specifically: * Drop `KclService.ListDepFiles` from `spec.proto` (the RPC method, the `ListDepFilesArgs` / `ListDepFilesResult` messages). * Remove `KclServiceImpl::list_dep_files` and the matching C wrapper `pub(crate) fn list_dep_files` in `capi.rs`. * Remove the `"KclService.ListDepFiles" => ...` row from `kcl_get_service_fn_ptr_by_name` and the corresponding blanket `HasErrorFormat for ListDepFilesArgs {}` impl. * Drop `"KclService.ListDepFiles".to_owned()` from `list_method`'s hard-coded RPC list so the response stays in sync with the dispatch table. `BuiltinService.Ping`, `BuiltinService.ListMethod`, and `KclServiceImpl:: list_method` are retained — those are exercised by the language-binding test suites that landed in the matching lib PR. Verified with `cargo test -p kcl-api --lib` (48 passed, 2 ignored). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com>

Commit:8380543
Author:Peefy
Committer:GitHub

feat(api): declare the GetSchemaTypeMappingUnderPath rpc in spec.proto (#2184) The service implementation, capi and jsonrpc entries for GetSchemaTypeMappingUnderPath already exist (kcl-lang/kcl#1766), and the result messages are generated from the proto, but the rpc itself was never declared in spec.proto. Add it so the proto service definition is complete and consistent with kcl-lang/lib, which mirrors this file. See https://github.com/kcl-lang/kcl/issues/1546. Co-authored-by: Peefy <peefy@qq.com>

Commit:6c0974f
Author:Peefy
Committer:GitHub

feat(test): add line-level coverage for kcl test (fixes #1481) (#2162) * feat(test): add line-level coverage for kcl test (fixes #1481) Adds opt-in line-level coverage to `kcl test` so test reports can show which source lines were exercised across the suite. Coverage is recorded through the existing evaluator walk — no separate instrumentation pass — and aggregated into a per-file `TestCoverageReport`. * `spec.proto`: extend `TestArgs` with `coverage`, add `FileCoverage`/`TestCoverageReport`/`CoverageSummary` messages and `line_hits` to `TestCaseInfo`. * `kcl-evaluator`: thread a `CoverageState` into the walker so each non-backtracking `walk_stmt` records `(filename, line)`. * `kcl-runner`: plumb `ExecProgramArgs::coverage` through to the evaluator and drain recorded hits back into `ExecProgramResult::coverage`. * `kcl-tools/src/testing`: enable coverage at the suite level, walk non-generated package AST to seed executable lines (canonicalized filenames so the evaluator's keys line up), and merge per-case `line_hits` into the report. `finalize` is idempotent and back-fills entries for files discovered but never hit. * `kcl-api`: wire `TestArgs::coverage` through the gRPC service and roll up the per-suite reports into a single proto. * Tests: new fixture at `crates/tools/src/testing/test_data/coverage` plus `coverage_off_keeps_reports_empty`, `coverage_on_collects_per_file_and_summary`, and `flatten_case_coverage_basic`. Test-runner cleanup is now best-effort: parallel test runs sharing a `_kcl_test.k` path no longer fail when one of them has already removed the file. Existing serialized `ExecProgramArgs` fixtures stay compatible via `#[serde(default)]` on the new `coverage` field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * fix(test): make coverage keys cross-platform (fixes PR #2162 Windows CI) The previous implementation let `Path::canonicalize` flow into the executable-line map unchanged, while per-case `line_hits` came in with whatever path the parser stored on the AST. On Linux/macOS the two formats happened to agree; on Windows they didn't: * `canonicalize` produces `\\?\D:\a\kcl\kcl\...\lib.k` (extended-length UNC prefix, backslash separators). * The parser-produced filename is `D:\a\kcl\kcl\...\lib.k` (no UNC, also backslashes — but the UNC marker alone is enough to break key equality). When the two strings disagree, `TestCoverageReport::finalize` looks up the executable map with `executable_lines_by_file.get(filename)`, returns `None`, and silently drops the executable-line back-fill. `coverage_on_collects_per_file_and_summary` then fails its "executable > covered" assertion. Introduce `normalize_coverage_key` (mod.rs) that: * strips the `\\?\` extended-length prefix on Windows, * replaces `\` with `/` on every platform — POSIX runs can still see backslash paths when the input originated from a Windows CI step or shared test harness. Use it in both ends of the funnel: * `canonicalize_for_coverage` (suite.rs) wraps its return value. * `flatten_case_coverage` (mod.rs) wraps per-case filenames before formatting `<file>:<line>` keys. Cover the new contract with two regression tests: * `normalize_coverage_key_strips_backslashes` — POSIX invariant that the function never returns a `\`. * `flatten_case_coverage_normalizes_keys` — end-to-end check that the new helper is wired into the report builder. Test suffixes in `coverage_on_collects_per_file_and_summary` are hardcoded with `/` separators instead of `Path::join`, matching the keys the report now produces. Signed-off-by: Peefy <xpf6677@163.com> * fix(test): drop racy run() call from coverage_off_keeps_reports_empty PR #2162 Windows CI failed `test_load_test_suites_and_run` after the prior cross-platform normalize fix landed. Root cause was a pre-existing race condition in the original coverage PR, exposed only after I added two new unit tests shifted cargo's scheduling: Both `coverage_off_keeps_reports_empty` and `test_load_test_suites_and_run` load `./src/testing/test_data/module/pkg` and call `run()`. Each `run()` writes `_kcl_test.k` inside that package and deletes it on cleanup. When cargo test schedules them on parallel threads, one test can delete the file while the other is still mid-execution, producing: Failed to load KCL file '...\_kcl_test.k'. Because 'The system cannot find the file specified. (os error 2)' Refactor `coverage_off_keeps_reports_empty` to verify the invariants structurally instead: * `TestOptions::default().coverage` is `false`, * `TestResult::default().coverage.files` is empty, * `TestCaseInfo::default().line_hits` is empty. `TestSuite::run` only populates those fields inside an `if opts.coverage { ... }` guard, so the invariants hold end-to-end without paying the cost of a parallel-suite race. Verified locally: ran the testing module 5x in a row, all 6 tests pass every time (previously flaky). Signed-off-by: Peefy <xpf6677@163.com> --------- Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Commit:fc0409f
Author:Claude Opus 4.6
Committer:Peefy

feat(test): add line-level coverage for kcl test (fixes #1481) Adds opt-in line-level coverage to `kcl test` so test reports can show which source lines were exercised across the suite. Coverage is recorded through the existing evaluator walk — no separate instrumentation pass — and aggregated into a per-file `TestCoverageReport`. * `spec.proto`: extend `TestArgs` with `coverage`, add `FileCoverage`/`TestCoverageReport`/`CoverageSummary` messages and `line_hits` to `TestCaseInfo`. * `kcl-evaluator`: thread a `CoverageState` into the walker so each non-backtracking `walk_stmt` records `(filename, line)`. * `kcl-runner`: plumb `ExecProgramArgs::coverage` through to the evaluator and drain recorded hits back into `ExecProgramResult::coverage`. * `kcl-tools/src/testing`: enable coverage at the suite level, walk non-generated package AST to seed executable lines (canonicalized filenames so the evaluator's keys line up), and merge per-case `line_hits` into the report. `finalize` is idempotent and back-fills entries for files discovered but never hit. * `kcl-api`: wire `TestArgs::coverage` through the gRPC service and roll up the per-suite reports into a single proto. * Tests: new fixture at `crates/tools/src/testing/test_data/coverage` plus `coverage_off_keeps_reports_empty`, `coverage_on_collects_per_file_and_summary`, and `flatten_case_coverage_basic`. Test-runner cleanup is now best-effort: parallel test runs sharing a `_kcl_test.k` path no longer fail when one of them has already removed the file. Existing serialized `ExecProgramArgs` fixtures stay compatible via `#[serde(default)]` on the new `coverage` field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com>

Commit:70c24b9
Author:Peefy
Committer:GitHub

feat(runtime): emit __kcl_info_meta__ marker for @info(type="attr") (fixes #2047) (#2168) * feat(runtime): emit __kcl_xml_attrs__ marker for @info(type="attr") (fixes #2047) Adds an opt-in XML attribute side-channel so downstream emitters (CLI --format xml, kcl-go XAML) can render decorated schema fields as XML attributes (vs. child elements). - Context gains an `attr_decorator_meta` registry keyed by schema local name then attribute name. `@info(type="attr")` populates it during decorator walk; unknown roles and missing kwargs are silently ignored so existing `@info` usages keep working unchanged. - `PlanOptions::emit_attribute_metadata` (new, default `false`) gates the marker emission. The planner appends a `__kcl_xml_attrs__: [...]` sibling to each schema instance whose registry entry lists attributes still present after filtering (`disable_none`, `query_paths`, ...), so the marker can never reference an absent key. - Proto/FFI/Config/runner plumbing for the new flag follows the same shape as the recently-added `format` selector. - `@info` regression grammar fixtures cover the simple case, unknown roles, and `@info()` with no kwargs. Default `-o json` / `-o yaml` output is byte-identical to pre-change; the marker only appears when callers opt in via the new flag. Signed-off-by: Peefy <xpf6677@163.com> * refactor(runtime): rename __kcl_xml_attrs__ marker to __kcl_info_meta__ The marker is emitted when PlanOptions::emit_attribute_metadata is set and carries @info decorator metadata into planned YAML/JSON. The previous name baked the XML output format into the protocol surface, but the underlying concept is generic — @info(type="attr") names a role that downstream emitters translate to their target format (XML attributes today, but the same channel will carry future roles like CDATA, comments, or protobuf tags). Renaming only the cross-consumer protocol surface (the marker key, the Rust constant, and the doc comments). INFO_ROLE_XML_ATTR and the flag/option names are intentionally left alone: the flag name (emit_attribute_metadata) already names the right thing, and the role constant is internal and not worth churning in this change. Tests: kcl-runtime val_plan (9), kcl-cmd (17), kcl-runner (6) all pass. Backward compatible at the KCL source level: emit_attribute_metadata defaults to false so -o json / -o yaml output is unchanged for users. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> * style(runtime): apply rustfmt to val_decorator/val_plan Fixes CI Code format check on the PR. The runtime PR (commit 9d0aa265) added new tests and a marker-emission branch that did not match the repo's rustfmt output: two long assert_eq!/assert! calls, a multi-line .iter().map().collect() chain that should be a single line, and an out-of-order use-statement entry. cargo fmt now passes clean and the existing unit tests are unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> --------- Signed-off-by: Peefy <xpf6677@163.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Commit:114b68c
Author:Peefy
Committer:GitHub

feat(sourcemap): emit Source Map v3 for generated YAML (#1630) (#2165) * feat(sourcemap): add Source Map v3 encoder for planned output Emits a Source Map v3 document (tc39.es/source-map) alongside generated YAML so downstream tooling can resolve generated line numbers back to the originating .k file, line and column. Addresses #1630. The encoder is hand-rolled rather than pulling in the source-map crate: the spec surface we need is small and the dependency isn't worth it for a single JSON-shaped string. record_yaml_top_level_keys locates each column-0 mapping key in the planned YAML, giving top-level-statement granularity without changing ValueRef::plan's signature or its many call sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(sourcemap): capture top-level assignment positions in the evaluator Records name -> (filename, line, column) for global-scope assignment and unification targets while walking the main package, and exposes Evaluator::source_map to pair that table with planned YAML. Positions are recorded before walk_assign_stmt's cached-value fast path, which can return early and would otherwise drop the mapping. The first position wins, so a name reassigned later still maps to where it was originally defined. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(sourcemap): expose the source map on ExecProgramResult Adds ExecProgramArgs::sourcemap_output to request a map and ExecProgramResult::sourcemap to carry the resulting v3 JSON. The map indexes generated YAML lines, so it is only produced when the YAML encoder actually ran — requesting --format json alongside a source map yields no map rather than one indexed against absent output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(sourcemap): add -m/--sourcemap CLI flag and config wiring Mirrors the --format plumbing: Config.sourcemap_output (kcl.yaml), ExecProgramArgs.sourcemap_output, and the -m/--sourcemap CLI flag all flow through to the runner, which writes the JSON next to the YAML. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(api): surface Source Map v3 over gRPC Adds sourcemap (string #5) to the ExecProgramResult proto message and copies it through in KclServiceImpl. The input side keeps using the runner-level ExecProgramArgs via kcl_api re-exports, so no proto field is needed there. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * test(runner): end-to-end check for sourcemap through exec_program Runs the runner against a 3-line KCL fixture, asserts the planned YAML contains the expected values, and verifies the emitted Source Map v3 references the fixture path and points each top-level key at the matching source line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> * style(sourcemap): collapse nested if for clippy::collapsible_if Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> --------- Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Commit:07f05b6
Author:Peefy
Committer:GitHub

feat(api): skip un-requested format encoder when --format is set (fixes #2051) (#2160) Wire the `-f/--format` CLI flag through to the runtime so it only runs the requested encoder. Previously `kcl run` always serialised to both JSON and YAML regardless of the flag, wasting compute on the un-used string. - Add `format: Option<String>` to `ExecProgramArgs` (proto tag 20). - Plumb it through `SettingsFile::Config` and the runner. - Gate the encoders in `ValueRef::plan` via the new `PlanOptions.format` field; un-requested side returns "" so existing consumers see no change. - Leave `ExecProgramResult` untouched for SDK compat; the un-requested field stays at its empty default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Peefy <xpf6677@163.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Commit:6266061
Author:Peefy
Committer:GitHub

test(error-format): add C-API and stderr coverage for ExecProgramArgs.error_format (#2115) * feat(error-format): initial implementation of diagnostic format support (#2090) Adds a configurable diagnostic output format (pretty / short / arcanist / sarif) that surfaces compile and evaluation errors as machine-readable records alongside the existing pretty-printed output. Three surfaces are wired up: - `--error_format` CLI flag, forwarded from `crates/cmd/src/run.rs` and resolved in `resolve_error_format` against the new `KCL_ERROR_FORMAT` env var. - `ExecProgramArgs.error_format` (proto field 19) so RPC / C-API callers can request a format per-request. - The renderer backends in `crates/error/src/format/` (short, arcanist, sarif), each implementing its respective spec. When a structured format is requested and the run produces an error, `emit_machine_readable_error` mirrors the formatted diagnostic to stderr so downstream tooling can consume it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> * test(error-format): add C-API and stderr coverage for ExecProgramArgs.error_format Closes the test gap left by the initial #2090 implementation, where zero tests exercised the proto field through the C ABI and no test captured the stderr emission path of `emit_machine_readable_error`. **C-API layer** (`capi_test.rs`): - `test_c_api_call_exec_program_with_arcanist_error_format` — round-trips proto field 19 through the C ABI with a valid KCL file. - `test_c_api_call_exec_program_with_arcanist_error_format_and_bad_kcl` — same fixture pattern but pointing at `bad_runtime_error.k`, so the runtime-error path actually reaches the machine-readable emitter. Without a non-empty `err_message`, the per-format dispatch would short-circuit and the test would be vacuously true. - `test_c_api_call_exec_program_with_invalid_error_format` — confirms an invalid `error_format` value surfaces as a service-level error. **Service-layer tests** (`service_impl.rs`): - Extracts a `render_machine_readable_error` `String`-returning sibling so the existing `emit_machine_readable_error` (and its `eprintln!` side effect) can be observed without capturing process-global stderr. - Six `render_*` tests verify the rendered output for short / arcanist / sarif / pretty / empty-message cases without going near stderr. - `emit_machine_readable_error_writes_distinct_stderr_per_format` — uses `gag::Redirect::stderr` to capture the actual `eprintln!` bytes per format and asserts pairwise-distinct output. Gated to Unix since `gag` does not yet support Windows (`crates/cmd/src/tests.rs:294`). - `exec_program_with_runtime_error_emits_per_format_stderr` — full end-to-end through `KclServiceImpl::exec_program` with a runtime error; verifies the rendered stderr differs per format. **Side effect fix**: `emit_machine_readable_error` now writes via `writeln!(std::io::stderr().lock(), ...)` instead of `eprintln!`. The stdlib's lazy fd-2 cache made the previous `eprintln!` invisible to `gag`-style stderr redirectors; this preserves identical visible behavior while becoming compatible with stderr capture in tests. **Dev-dependency**: adds `gag = "1.0"` to `kcl-api`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> * style: apply cargo fmt Fixes the "Code format check" step in CI. No functional changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> * test(error-format): stabilize err_message path & serialize test_run_command - The bad-KCL fixture's expected `err_message` embeds the absolute manifest path of `bad_runtime_error.k`, which differs between dev machines and CI. Wrap the C-API comparison so both sides substitute `<MANIFEST_DIR>` for the manifest directory before equality. - `test_run_command` reads `KCL_ERROR_FORMAT` via `run_command`, so it must hold `error_format_env_lock()` to avoid a parallel `error_format_*` test flipping the variable mid-flight and surfacing an `invalid diagnostic format` error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peefy <xpf6677@163.com> * fix(test): normalize Windows path separators and recover from poisoned mutex The `test_c_api_call_exec_program_with_arcanist_error_format_and_bad_kcl` test panics on Windows because the produced `err_message` embeds the absolute path of `bad_runtime_error.k` with `\` separators, while the fixture (and the manifest-dir placeholder substitution) use `/`. The wrapper now normalises remaining `\` to `/` after the manifest-dir substitution so the comparison is host-OS independent. Also harden the shared `TEST_MUTEX.lock()` against `PoisonError`. On failure of any one `test_c_api` test the panic poisons the mutex, which then causes every subsequent test in the same process to fail with `PoisonError { .. }` — masking the real failure and producing cascading false negatives. Recovering from the poison (`p.into_inner()`) lets the remaining tests report their actual outcome. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Timi <timi@kcl-lang.io> Signed-off-by: Peefy <xpf6677@163.com> --------- Signed-off-by: Peefy <xpf6677@163.com> Signed-off-by: Timi <timi@kcl-lang.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Commit:93f7a4f
Author:Jakob Beckmann
Committer:GitHub

Core implementation for dry-run formatting (#2108) * feat(tools): enable a dry_run flag in core formatter Relates-to: kcl-lang/kcl#2101 Signed-off-by: Jakob Beckmann <f4z3r-github@pm.me> * feat(api): enable the service implementation run dry run formats Relates-to: kcl-lang/kcl#2101 Signed-off-by: Jakob Beckmann <f4z3r-github@pm.me> --------- Signed-off-by: Jakob Beckmann <f4z3r-github@pm.me>

Commit:adc4d18
Author:Peefy
Committer:GitHub

feat: add function type for the KCL schema type API (#2017) * feat: add function type for the KCL schema type API Signed-off-by: Peefy <xpf6677@163.com> * ci: deprecated macos-13 runner images Signed-off-by: Peefy <xpf6677@163.com> --------- Signed-off-by: Peefy <xpf6677@163.com>

Commit:ecd91a9
Author:Peefy
Committer:GitHub

feat: add index signature for the KCL schema type API (#2016) Signed-off-by: Peefy <xpf6677@163.com>

Commit:cf6bae8
Author:Peefy
Committer:GitHub

refactor: rename kcl api function args and result (#2007) Signed-off-by: Peefy <xpf6677@163.com>

Commit:6ad9460
Author:Peefy
Committer:GitHub

refactor: cargo workspace for the entire project (#2004) * refactor: cargo workspace for the entire project Signed-off-by: Peefy <xpf6677@163.com> * fix: compiler base compile and format issues Signed-off-by: Peefy <xpf6677@163.com> * fix: centos7 kcl lib build Signed-off-by: Peefy <xpf6677@163.com> * chore: remove llvm features Signed-off-by: Peefy <xpf6677@163.com> * refactor: rust edition 2024 Signed-off-by: Peefy <xpf6677@163.com> * chore: bump kclvm to kcl Signed-off-by: Peefy <xpf6677@163.com> * fix: kcl runtime python test Signed-off-by: Peefy <xpf6677@163.com> * chore: update snapshot tests Signed-off-by: Peefy <xpf6677@163.com> * refactor: rust edition 2024 Signed-off-by: Peefy <xpf6677@163.com> * ci: fix unit test and windows build scripts Signed-off-by: Peefy <xpf6677@163.com> * fix: unit test cases Signed-off-by: Peefy <xpf6677@163.com> * fix: driver unit test Signed-off-by: Peefy <xpf6677@163.com> * fix: artifact path Signed-off-by: Peefy <xpf6677@163.com> * fix: artifact path Signed-off-by: Peefy <xpf6677@163.com> * fix: kcl driver unit test cases Signed-off-by: Peefy <xpf6677@163.com> * fix: kcl windows output path Signed-off-by: Peefy <xpf6677@163.com> --------- Signed-off-by: Peefy <xpf6677@163.com>

Commit:6862c47
Author:Peefy
Committer:GitHub

refactor: kcl api protobuf build (#2001) * chore: remove un-used vars and flags Signed-off-by: Peefy <xpf6677@163.com> * refactor: kcl api protobuf build Signed-off-by: Peefy <xpf6677@163.com> * fix: unit test suites Signed-off-by: Peefy <xpf6677@163.com> --------- Signed-off-by: Peefy <xpf6677@163.com>

Commit:b2a6fc6
Author:zongz
Committer:GitHub

feat: add opts for external deps for api validate (#1885) * feat: add opts for external deps for api validate Signed-off-by: zongz <zongzhe1024@163.com> * fix: make fmt Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix linux test case Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

The documentation is generated from this commit.

Commit:b75dd64
Author:zongz
Committer:zongz

feat: add opts for external deps for api validate Signed-off-by: zongz <zongzhe1024@163.com>

The documentation is generated from this commit.

Commit:eb61d84
Author:He1pa
Committer:GitHub

feat: add service api GetSchemaTypeMappingUnderPath (#1766) * feat: add service api GetSchemaTypeMappingUnderPath Signed-off-by: he1pa <18012015693@163.com> * fix typo Signed-off-by: he1pa <18012015693@163.com> --------- Signed-off-by: he1pa <18012015693@163.com>

Commit:72cfdde
Author:he1pa

fix typo Signed-off-by: he1pa <18012015693@163.com>

Commit:f3e31f0
Author:he1pa
Committer:he1pa

feat: add service api GetSchemaTypeMappingUnderPath Signed-off-by: he1pa <18012015693@163.com>

Commit:837bde1
Author:peefy

chore: remove reset_plugin API Signed-off-by: peefy <xpf6677@163.com>

Commit:128012c
Author:Peefy
Committer:GitHub

chore: add more docs and examples for api spec (#1486) Signed-off-by: peefy <xpf6677@163.com>

Commit:1a9a729
Author:Artem V. Navrotskiy
Committer:GitHub

Add `GetVersion` method to public API (#1479) Signed-off-by: Artem V. Navrotskiy <bozaro@yandex.ru>

Commit:dadfd04
Author:zongz
Committer:GitHub

feat: support conf merge in api ListVariables (#1415) * feat: automatic configuration merging is supported in ListVariables api Signed-off-by: zongz <zongzhe1024@163.com> * fix: add fmt for ListVariable api return code Signed-off-by: zongz <zongzhe1024@163.com> * fix: make fmt Signed-off-by: zongz <zongzhe1024@163.com> * fix: add more test cases Signed-off-by: zongz <zongzhe1024@163.com> * fix: rm useless comments Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:d0c1eae
Author:zongz
Committer:GitHub

feat: api list_variables supports get variables from multi-files (#1389) * feat: api list_variables supports get variables from multi-files Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix CR comments Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix test cases Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:1f262c7
Author:Peefy
Committer:GitHub

feat: impl toolchain trait for the native toolchain (#1363) * feat: impl native toolchain and mod update APIs Signed-off-by: peefy <xpf6677@163.com> * fix: schema type api test suites Signed-off-by: peefy <xpf6677@163.com> * test: update capi test cases Signed-off-by: peefy <xpf6677@163.com> * feat: add git2 and ssl dependencies for the git command clone feature Signed-off-by: peefy <xpf6677@163.com> * test: disable the bracktrace print Signed-off-by: peefy <xpf6677@163.com> --------- Signed-off-by: peefy <xpf6677@163.com>

Commit:4c8bbc4
Author:Peefy
Committer:GitHub

refactor: schema type APIs (#1368) Signed-off-by: peefy <xpf6677@163.com>

Commit:ed882bb
Author:Peefy
Committer:GitHub

refactor: override spec with more attribute config operation including : and += (#1358) Signed-off-by: peefy <xpf6677@163.com>

Commit:f90939f
Author:zongz
Committer:GitHub

feat: support return list and dict structure from api ListVariable (#1349) * feat: support return list and dict structure from api ListVariable Signed-off-by: zongz <zongzhe1024@163.com> * fix: rm un-used import Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:aba7e37
Author:zongz
Committer:GitHub

feat: add parse errors in reture value of OverrideFile api (#1340) fix: add parse errors in reture value of OverrideFile api Signed-off-by: zongz <zongzhe1024@163.com>

Commit:a6a21e7
Author:Peefy
Committer:GitHub

chore: bump kcl version to v0.9.0-alpha.2 (#1324) * chore: bump kcl version to v0.9.0-alpha.2 Signed-off-by: peefy <xpf6677@163.com> * chore: bump parse_errs to parse_errors Signed-off-by: peefy <xpf6677@163.com> --------- Signed-off-by: peefy <xpf6677@163.com>

Commit:4ebbb55
Author:zongz
Committer:GitHub

feat: add parser error messages into the result of api ListVariables (#1316) * feat: add parser error messages into the result of api ListVariables Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix cr comments and test case Signed-off-by: zongz <zongzhe1024@163.com> * fix: make fmt Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:58ff118
Author:zongz
Committer:GitHub

feat: add operation for variable in ListVariables (#1282) * feat: add operation for variable in ListVariables Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix test case Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:4a62bd2
Author:zongz
Committer:GitHub

feat: add type name for schema_expr in list_variables (#1279) Signed-off-by: zongz <zongzhe1024@163.com>

Commit:5f8ccd3
Author:Mintu Gogoi
Committer:GitHub

`get_schema_type` function will now return `SchemaType` instances with base schema information included (#1272) * `get_schema_type` and `get_full_schema_type` will now return `SchemaType` instance Signed-off-by: utnim2 <mintugogoi567@gmail.com> * added the recursive function Signed-off-by: utnim2 <mintugogoi567@gmail.com> * fixed the types Signed-off-by: utnim2 <mintugogoi567@gmail.com> --------- Signed-off-by: utnim2 <mintugogoi567@gmail.com>

Commit:04c11a9
Author:zongz
Committer:GitHub

feat: add api list_variables to select variable (#1214) * feat: add api list_variables to select variable Signed-off-by: zongz <zongzhe1024@163.com> * fix: add test case with format expr Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:7264ff7
Author:Peefy
Committer:GitHub

feat: impl schema node for the evaluator (#1170) Signed-off-by: peefy <xpf6677@163.com>

Commit:88553f9
Author:Peefy
Committer:GitHub

feat: add list options API (#1135) Signed-off-by: peefy <xpf6677@163.com>

Commit:059bf38
Author:zongz
Committer:GitHub

feat: add datafile parameter for the `validate_code` api (#1103) * fix: add datafile to api validate_code Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix failed test cases Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:1a5d199
Author:Peefy
Committer:GitHub

feat: add the show_hidden flag (#1070) feat: add show_hidden flag in CLIs and APIs Signed-off-by: peefy <xpf6677@163.com>

Commit:1efa8bc
Author:Peefy
Committer:GitHub

feat: impl build_program and exec_artifact APIs (#1017) Signed-off-by: peefy <xpf6677@163.com>

Commit:5b40623
Author:Peefy
Committer:GitHub

feat: add symbol to node and type symbol APIs (#1004) Signed-off-by: peefy <xpf6677@163.com>

Commit:38ba669
Author:Peefy
Committer:GitHub

feat: scope api for multiple lang sdks (#996) * feat: add scope API for multigual SDKs Signed-off-by: peefy <xpf6677@163.com> * feat: impl AST index serializer Signed-off-by: peefy <xpf6677@163.com> * feat: ignore ast id serialize when flag is false Signed-off-by: peefy <xpf6677@163.com> --------- Signed-off-by: peefy <xpf6677@163.com>

Commit:8c60381
Author:Peefy
Committer:GitHub

feat: semantic API for multiple language SDKs (#989) Signed-off-by: peefy <xpf6677@163.com>

Commit:c9cf9c3
Author:Peefy
Committer:GitHub

feat: feat parser api for multiple SDKs (#978) * fix: information typo Signed-off-by: peefy <xpf6677@163.com> * feat: impl parser API Signed-off-by: peefy <xpf6677@163.com> * fix: mod relative path dir read Signed-off-by: peefy <xpf6677@163.com> * chore: remove exec program recursive features Signed-off-by: peefy <xpf6677@163.com> * chore: remove un-used fields in settings Signed-off-by: peefy <xpf6677@163.com> * test: change validate tool tests to insta snapshots Signed-off-by: peefy <xpf6677@163.com> * chore: format code Signed-off-by: peefy <xpf6677@163.com> * fix: test cases on windows Signed-off-by: peefy <xpf6677@163.com> --------- Signed-off-by: peefy <xpf6677@163.com>

Commit:dbb0bb5
Author:peefy

chore: fix typo requset to request Signed-off-by: peefy <xpf6677@163.com>

Commit:61e8221
Author:amyxia
Committer:GitHub

feat: rename API support overwrite changes to files (#898) * support inplace rename symbol on files Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * add more test cases Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * chore: make fmt Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * fix test cases Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * minor: fix fmt Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * fix: fix the failed test case on windows Signed-off-by: zongz <zongzhe1024@163.com> * chore: bump rust toolchain version to 1.73 Signed-off-by: peefy <xpf6677@163.com> * chore: cargo clippy fix Signed-off-by: peefy <xpf6677@163.com> * chore: format files Signed-off-by: peefy <xpf6677@163.com> --------- Signed-off-by: xiarui.xr <xiarui1994@gmail.com> Signed-off-by: zongz <zongzhe1024@163.com> Signed-off-by: peefy <xpf6677@163.com> Co-authored-by: zongz <zongzhe1024@163.com> Co-authored-by: peefy <xpf6677@163.com>

Commit:6245770
Author:Peefy
Committer:GitHub

feat: add file opts for validate api (#919) Signed-off-by: peefy <xpf6677@163.com>

Commit:6096c41
Author:zongz
Committer:GitHub

feat: add api 'get_full_schema_type' to return the schema ty with third party (#906) * feat: add api 'get_full_schema_type' to return the schema ty with third party Signed-off-by: zongz <zongzhe1024@163.com> * fix: fix windows test case Signed-off-by: zongz <zongzhe1024@163.com> * feat: fix CR comments Signed-off-by: zongz <zongzhe1024@163.com> * fix: add missing api in service Signed-off-by: zongz <zongzhe1024@163.com> --------- Signed-off-by: zongz <zongzhe1024@163.com>

Commit:7e97508
Author:Peefy
Committer:GitHub

feat: impl testing APIs (#904) Signed-off-by: peefy <xpf6677@163.com>

Commit:fde3fea
Author:Peefy
Committer:GitHub

feat: support print functions for normal logger writer and not only for stdout (#896) Signed-off-by: peefy <xpf6677@163.com>

Commit:5d3aec9
Author:amyxia
Committer:GitHub

feat: implement rename api with new sema model (#890) * feat: implement rename api Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * minor: fix clippy errors Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * fix select symbol bug, return range instead of symbol ref Signed-off-by: xiarui.xr <xiarui1994@gmail.com> * minor: use anyhow Result Signed-off-by: xiarui.xr <xiarui1994@gmail.com> --------- Signed-off-by: xiarui.xr <xiarui1994@gmail.com>

Commit:e6e98b8
Author:amyxia
Committer:GitHub

feat: add rename, renameCode API (#843) feat: rename api. mock implementation Signed-off-by: xiarui.xr <xiarui1994@gmail.com>

Commit:18dac8a
Author:zongz
Committer:GitHub

feat: add '--recursive' flag to compile the whole dir (#822) feat: add cli flag '--recursive' to compile the whole dir Signed-off-by: zongz <zongzhe1024@163.com>

Commit:922b81b
Author:Peefy
Committer:GitHub

feat: impl path selector in the run API. (#802) Signed-off-by: peefy <xpf6677@163.com>

Commit:63def27
Author:zongz
Committer:GitHub

feat: add 'compile_only' flag for lint check (#737) Signed-off-by: zongz <zongzhe1024@163.com>

Commit:be09eef
Author:amyxia
Committer:GitHub

enhance: doc parser support schema example (#703) * enhance: doc parser support schema example * chore: code style and format code

Commit:1b564db
Author:Peefy
Committer:GitHub

feat: impl include schema type path for planned values including JSON and YAML. (#659)

Commit:25c2748
Author:Peefy
Committer:GitHub

chore: remove internal/scripts folder and move it to scripts. (#641) * chore: remove internal/scripts folder and move it to scripts. * chore: update parser fuzz deps.

Commit:3824aa0
Author:Peefy
Committer:GitHub

chore: fix wrong KclType documents. (#640)

Commit:19680af
Author:Peefy
Committer:GitHub

feat: enhance get schema type API with more information. (#633) * feat: enhance get schema ty API with more information. * fix: sub schema attribute doc mis-overwritten and add more tests

Commit:5c7c9ec
Author:zongz
Committer:GitHub

feat: add '-E/--external' to api. (#567)

Commit:086302b
Author:Peefy
Committer:GitHub

feat: impl sort keys in setting files. (#552)

Commit:a0d04c6
Author:NeverRaR
Committer:GitHub

fix: rpc api (#505) * refactor: remove unused rpc api and catch panic * fix: plan according to sort_keys arg * fix: deserialize OverrideAction properly * fix: format parse opts properly

Commit:d28ff92
Author:Peefy
Committer:GitHub

refactor: remove kclvm python CI tests, CLI and plugin related codes. (#495) refactor: remove all python in kclvm cli and test and move them into kclvm-py repo.

Commit:bf66927
Author:NeverRaR
Committer:GitHub

feat: support json rpc server (#484) * feat: support json rpc server * chrom: add modify notice in third-party/prost-wlt/wkt-types/build.rs

Commit:800bfda
Author:Peefy
Committer:GitHub

feat: add more kclvm capis and tests (#473) * chore: clean code. * chore: cargo update * refactor: use large result buffers. * feat: add more kclvm capis and tests.

Commit:7834f04
Author:Peefy
Committer:GitHub

feat: impl schema query API. (#471)

Commit:7f7dc6e
Author:Peefy
Committer:GitHub

refactor: remove internal kclvm python (#310)

Commit:0b1f21a
Author:Peefy
Committer:GitHub

refactor: use external kclvm_py through pip in scripts (#307)

Commit:f6b831b
Author:chai2010

Initial project