-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Description
We have a setup where we have many specs.Containers
objects spread across many files.
I'd like to add a script, where I can run kcl render.k
, which consumes all the containers, and outputs a single object (either to stdout, or to a file). My issue is that to get this to work, I'm using globbing all kcl files such that the script calls:
kcl file1.k file2.k file3.k ... fileN.k render.k
This seems to have some issues:
- It's very slow, and I have suspicion it's evaluating some things twice.
- File scoped variables become global scoped, ie: 2 separate files in 2 separate directories with a top level
myField
variable, will now result in a conflict specs.Containers.instances()
works within render.k, but if I have another file that is not part of the glob, but maybe indirectly imported that also attempts to find all containers, it doesn't. Which leads me to believe there are some further scoping oddities.
I might be abusing the intent of running kcl
, is there a better way to do what I want to accomplish? Let me know if I can provide more info on this :)
spastorclovr
Metadata
Metadata
Assignees
Labels
No labels