-
TLDR: I need to combine the import support of In theory one can produce their own Specifically I would like to dynamically change the “root key” for some of the files in the build, so that they are merged at a key different than what their source file says. I need to honor the imports in those files, so I can’t use I found the following fields in the
Of those, the comments tell me that only I am hoping to modify these fields to transform the correct fioes in the correct way. My best bet seems to be modifying the contents of Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can modify It is also fine to modify the contents of existing You do need to ensure the Imports maps is updated accordingly to ensured imported packages are loaded as well if the added files introduce any imports, I believe. I may remove this requirement in the future, but for now it can't hurt to add it. More info: By the time |
Beta Was this translation helpful? Give feedback.
-
Thank you. Does this mean that some of the fields of |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#440. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
You can modify
build.Instance
files, like adding additionalFiles
, at will. The compiler will only look atFiles
.It is also fine to modify the contents of existing
Files
.You do need to ensure the Imports maps is updated accordingly to ensured imported packages are loaded as well if the added files introduce any imports, I believe. I may remove this requirement in the future, but for now it can't hurt to add it.
More info:
The building goes in two stages: first it collects the set of files, then it converts those to syntax trees in
Files
.By the time
load
is done, all is converted toFiles
, so it safe to ignore any of the other file fields.