-
Notifications
You must be signed in to change notification settings - Fork 1
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
preguide: next steps for preguide schema #115
Comments
In later versions of preguide we will look to introduce multiple scneario and language support per #115. Simplify the Guide schema ahead of any such changes.
In later versions of preguide we will look to introduce multiple scneario and language support per #115. Simplify the Guide schema ahead of any such changes.
In later versions of preguide we will look to introduce multiple scneario and language support per #115. Simplify the Guide schema ahead of any such changes.
In later versions of preguide we will look to introduce multiple scneario and language support per #115. Simplify the Guide schema ahead of any such changes.
Note that cuelang/cue#565 and cuelang/cue#577 are now solved which unblocks much of this work. |
Note that in order to fully support the multi-format form of
cuelang/cue#571 shouldn't be a blocker here because we can define |
In case cuelang/cue#571 is a block, we can work around this for now using explicit fields, and rewrite when additional field support lands:
|
A note to self/@marcosnils: when we come to add the full-blown |
With a number of recent changes/improvements in CUE we can greatly simplify the preguide schema. This also serves as preparation for changes that will be made as part of #64. Note this also upgrades to the latest CUE, because this refactored schema is not susceptible to cuelang/cue#784. For #115
With a number of recent changes/improvements in CUE we can greatly simplify the preguide schema. This also serves as preparation for changes that will be made as part of #64. Note this also upgrades to the latest CUE, because this refactored schema is not susceptible to cuelang/cue#784. For #115
With a number of recent changes/improvements in CUE we can greatly simplify the preguide schema. This also serves as preparation for changes that will be made as part of #64. Note this also upgrades to the latest CUE, because this refactored schema is not susceptible to cuelang/cue#784. For #115
At a high level we want to:
#TerminalName
to constrain_#stepCommon.Terminal
Steps: [name=string]
that allows specialisation at language and/or scenarioFor 1 we should be able to do:
But given we chose to have package instances themselves "implement"
preguide.#Guide
, then we need some way to be able to refer to the embedded definitions#Command
etc (because they are effectively definitions on the instance ofpreguide.#Guide
, given that they are defined in terms of regular fields ofpreguide.#Guide
).This approach by definition requires us to embed the
preguide.#Guide
definition in a script file. Which currently causes us to run into cuelang/cue#565.For 2, we should be able to move to a definitions of
Steps
that looks something like this:This change is contingent on change 1, however. Because we need to drop our
ok
-based check on terminal names:And it also requires us to have some answer on how we constrain
_#ScenarioName
to not be a language code. Two options on that front:This is covered in cuelang/cue#571.
The second change is also contingent on:
With this second change we can effectively require that every step is well defined for every language in every scenario (via judicious use of defaults). That saves us ever having to implement that fallback logic in Go (although we could do if we don't get a solution to cuelang/cue#577). Under this proposal, languages are listed by the guide author; scenarios are declared along with the images they require. Therefore, we simply need to walks
Steps
to find all step names, at which point we have our universe to iterate.One thing worth bearing in mind at this point is whether it is ever possible/required to only have a step defined for a specific scenario. If so, what does this mean?
The text was updated successfully, but these errors were encountered: