Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get schemas with proper PkgPath and BaseSchema from a given kcl.mod, including all dependencies #1546

Open
zhuxw opened this issue Aug 7, 2024 · 0 comments
Assignees
Labels
resolver semantic Issues or PRs related to kcl semantic and checker

Comments

@zhuxw
Copy link

zhuxw commented Aug 7, 2024

Feature Request

Is your feature request related to a problem? Please describe:
When getting PkgPath and BaseSchema of kclTypes, the current apis (GetFullSchemaTypeMappingWithFilters) can only get from the pkg itself, instead of from a complete kcl.mod.
e.g.:
Given kcl.mod:

[package]

[dependencies]
mymod = { git = "https://domain/abc/mymod.git", tag = "v0.1.21" }
base = { git = "https://domain/def/base.git", tag = "v0.1.0-alpha.2" }

In catalog there is mymod.v1.DNSConfig, which inherits base.v1.GlobalConfiguration in the base pkg.

Problem1:
When getting kclType mymod.v1.DNSConfig, its PkgPath will be "main" instead of "v1".

Problem2:
If the kcl.mod in pkg catalog does not have dependency of pkg kam (which is wierd but it's actually working), the BaseSchema of kclType mymod.v1.DNSConfig will be nil.

Describe the feature you'd like:
Get schemas with proper PkgPath and BaseSchema from a given kcl.mod, including all dependencies

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@Peefy Peefy added the semantic Issues or PRs related to kcl semantic and checker label Aug 8, 2024
@Peefy Peefy modified the milestones: v0.11.0 Release, v0.10.0 Release Aug 8, 2024
@Peefy Peefy assigned Peefy and He1pa and unassigned Peefy Aug 8, 2024
@Peefy Peefy added the resolver label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolver semantic Issues or PRs related to kcl semantic and checker
Projects
None yet
Development

No branches or pull requests

3 participants