kcl-lang / kcl-go

KCL Go SDK
https://pkg.go.dev/kcl-lang.io/kcl-go@main
Apache License 2.0
52 stars 26 forks source link

Get locally depended .k files of a given .k file (from imports) #281

Closed zhuxw closed 7 months ago

zhuxw commented 7 months ago

Feature Request

Is your feature request related to a problem? Please describe: Given that .k files are in a remote repo, I'd like to only download the minimal set of .k files that need compile.

Describe the feature you'd like: Step1. I download path/to/main.k from git repo. Step2. I call a kcl function to retrieve the depended .k files of path/to/main.k. This function just reads the "imports" statments in the .k file and excludes files from remote mods (could read from kcl.mod).

Describe alternatives you've considered: Download all files in the repo. This would not be acceptable when the repo is too large.

Teachability, Documentation, Adoption, Migration Strategy: