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

Issues with kcl modules about the package re-downloading and local package deps #320

Closed
dennybaa opened this issue May 17, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dennybaa
Copy link

Hello there, again thank you very much for a beautiful project.

I'm just filing an issue to keep track of it, though totally not crucial:

  1. Seems that the dependencies can be fetched twice.
kcl mod update
adding 'file-manifests' with version '0.1.0'
downloading 'some-org/iaas-kcl-modules/file-manifests:0.1.0' from 'ghcr.io/some-org/iaas-kcl-modules/file-manifests:0.1.0'
downloading 'some-org/iaas-kcl-modules/file-manifests:0.1.0' from 'ghcr.io/some-org/iaas-kcl-modules/file-manifests:0.1.0'
  1. Modules with local dependencies do not work.

Let's admit we have a remote module with the mod file (if I'm not wrong with the actual syntax) as bellow:

[package]
name = "file-manifets"
edition = "v0.8.0"
version = "0.1.0"

[dependencies]
k8s = { oci = "oci://ghcr.io/kcl-lang/k8s", tag = "1.28" }
names = { path = "../names" }

The above package after published is broken, since kcl mod later on tries to resolve names and this doesn't work... Something should be decided regarding this, like would it or not make sense to vendor local dependencies together with the package.

@Peefy Peefy added the bug Something isn't working label May 18, 2024
@Peefy Peefy changed the title Issues with kcl modules Issues with kcl modules about the package re-downloading and local package deps May 20, 2024
@dennybaa
Copy link
Author

Hello there @Peefy @zong-zhe , another issue which might be approached by the above enchancments:

  1. kcl -dY kcl.yaml rules/main.k as expected
  2. cd ../; kcl -dY main/kcl.yaml main/rules/main.k. Evidently tries to duplicate path...
    Error: Cannot find the kcl file, please check the file path /.../main/main/rules/main.k
    
  3. cd ../; kcl -dY main/kcl.yaml rules/main.k. Already fails to resolve modules ....

@Peefy Peefy closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants