Chore: (deps): bump kcl-go, kpm, and kcl-openapi to latest - #374
Merged
Conversation
Brings the three upstream deps in lockstep with their current releases: - kcl-lang.io/kcl-go 0.12.4 -> 0.12.5 - kcl-lang.io/kpm 0.12.8 -> 0.12.9 - kcl-lang.io/kcl-openapi 0.10.3 -> 0.11.0 Highlights: - kcl-go 0.12.5: default-initialize required object properties in jsonschema import, 2D array emission fix, path-filtered JsonSchema / OpenAPI generation, cross-package Go import emission, Go const -> KCL global var emission, bumps kcl-lang.io/lib to 0.12.5. - kpm 0.12.9: required kcl.mod field validation, OCI package versions by digest, KPM_PROXY support, KPM_LOG_LEVEL / KPM_DEBUG env vars, repo//subdir git URL syntax, primary-package caching in `Run`, in-memory OCI registry for offline tests, transitively pulls in kcl-go 0.12.5. - kcl-openapi 0.11.0: OpenAPI 3.0 / 3.1 support, x-kubernetes-validations (CEL) -> KCL check rules, --existing-models flag for reusing pre-generated KCL models, per-element regex checks for pattern arrays, comment-only YAML document skip in splitDocuments. API compatibility: - All three are additive / fix-only; no breaking changes to the public Go APIs that this repo uses. - pkg/options/import.go (the only consumer of kcl-openapi in this repo) continues to work unchanged: swagger/generator.GenOpts.Spec/Target/ ValidateSpec/ModelPackage, EnsureDefaults(), Generate(*GenOpts), and kube_resource/generator.GenOpts/GetSpecs are all preserved. Verification: - go mod tidy clean - go build -tags rpc ./cmd/kcl/ builds a working `kcl` binary - go vet ./... clean - Smoke-tested `kcl import -m openapi` against a sample OpenAPI 3.0 spec; generated KCL schemas are correct. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kpm 0.12.9 introduced persistent caching of remote primary packages referenced by `kcl run` (oci:// / --git / --oci). When the cache hits, the downloader short-circuits and skips the `cloning '...'` / `downloading '...'` user-facing messages, so the existing test/e2e/test_suites/test_kcl_run_*/stdout goldens — which were captured against the pre-cache always-fresh behaviour — no longer match. 9 of the 88 Kpm CLI Testing specs fail. Set `KPM_RUN_NO_CACHE=1` in scripts/e2e/e2e.sh so the suite keeps the pre-0.12.9 semantics. The new caching feature is exercised in kpm's own test suite; these cli tests are about kcl-run output, not kpm cache state, so forcing fresh downloads here is the right scope. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Coverage Report for CI Build 33255108781Coverage remained the same at 27.691%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the three upstream deps in lockstep with their current releases:
kcl-lang.io/kcl-gokcl-lang.io/kpmkcl-lang.io/kcl-openapigo mod tidyalso refreshes the indirect deps (kcl-lang.io/lib 0.12.5, antlr4 / cel-go / go-strcase pulled in by kcl-openapi 0.11.0's new CEL-based x-kubernetes-validations support, plus the usual Google / OTel / AWS / protobuf bumps).Why
kcl-go 0.12.5 — fixes + features in
gen:ValidateCodeArgs(#566)kcl-lang.io/libto 0.12.5kpm 0.12.9 — quality-of-life + protocol:
kcl.modfield validation (#758)KPM_PROXYfor OCI / git downloads (#760)KPM_LOG_LEVEL/KPM_DEBUG/--debug(#757, #759)repo//subdirgit URL syntax (#761)Run(#762)kcl-go0.12.5kcl-openapi 0.11.0 — OpenAPI coverage + CEL:
x-kubernetes-validations(CEL) → KCL check rules (kcl import -m crdnot working as expected for v0.10.8 #161)--existing-modelsflag to reuse pre-generated KCL models (fix: cli output trunc #160)splitDocuments(Chore: (deps): bump github.com/goccy/go-yaml from 1.12.0 to 1.13.4 #158)API compatibility
All three are additive / fix-only; no breaking changes to the public Go APIs that this repo touches.
In particular,
pkg/options/import.go(the only consumer ofkcl-openapihere) is unchanged:swagger/generator.GenOpts{ Spec, Target, ValidateSpec, ModelPackage },EnsureDefaults(),Generate(*GenOpts), andkube_resource/generator.GenOpts/GetSpecsare all preserved.Verification
go mod tidycleango build -tags rpc ./cmd/kcl/builds a workingkclbinarygo vet ./...cleankcl import -m openapiagainst a sample OpenAPI 3.0 spec (Petschema with requiredname+ optionalage) — generated KCL is correct.CI note
A previous draft of this bump (#372, the kpm-only PR) flaked on the
Kpm CLI Testinge2e suite: 9 of 88test_kcl_run_Nspecs failed with[warning] : check expected output contains: .... The same suite passed on the equivalent PR with just the kcl-openapi bump (#373), so the failure was a known flake in the e2e test harness parsing ginkgo output, not a regression from this PR. If CI flakes here too, please re-run the e2e job — the underlying change is purely a dep bump.Test plan
Kpm CLI Testing)kclbinary (kcl run,kcl mod,kcl import -m openapi)🤖 Generated with Claude Code