You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we have some custom dagger-cue logic to validate the plan correctness, just doing a simple cue eval might not be enough to make sure that our plans are correct. We also don't want users to install the CUE binary in order to validate that they're plans are actually runnable. This helps in the case where you're refactoring things and making changes that don't actually require any action to be executed each time.
This would be analogous the compilation steps in compiled languages. In the context of developing my plan, I would probably want to just verify the plan and not just one particular run of one particular action. I just want to know if my plan "compiles".
Proposal
dagger-cue verify: verifies the plan in the CWD dagger-cue verify -p plan.cue: verifies the plan according to the specified path
If plan validates successfully, command exists with status code 0 and without output. On the contrary, command exits with status code 1 and showing the corresponding error through stderr
To have fast iteration loops and feedback while writing my plan. I could also potentially run dagger-cue verify each time I save the file in my editor to get immediate feedback
How are you currently working around this?
Forcing dagger-cue to execute a #Nop action which triggers plan validation.
This is very needed, and can we PLEASE add a check for #493 ... For now this is a "wontfix" from upstream CUE and it's easily in my top 3 most painful bugs right now. All it takes is a typo in an imported definition name... and I'll be wasting 30mn of my time, or more, on a wild goose chase trying to understand why my plan isn't working. I bet many developers hit this problem every day without even realizing it - since they have no idea what's wrong. I wouldn't be surprised if people had given up on Dagger altogether because of it. It's just that bad.
In terms of command/functionality, I think the following are needed (or at least, were requested at some point or another):
verify the plan is correct
eval the plan (e.g. cue eval without cue)
plan the plan: show the list of actions and their dependencies. I don't think we're tracking this but to me it would be super useful to debug. UPDATE: Logged as dagger plan command #2335
Now I'm wondering which of these could be combined.
Of those, I think verify is the one that doesn't necessarily warrant its own command, could be combined with another (e.g. dagger lint? dagger eval? dagger plan?)
Edit: @marcosnils btw, today you kinda can get what you want with dagger do --help which as a side effect will load the entire plan (to display the list of available actions).
Activity
NotTheEconomist commentedon Apr 27, 2022
+1. In addition to "doing a simple
cue evalmight not be enough" -- we should not require that Dagger users install the cue binary.Recommend a
dagger verify --fmtoption that additionally runscue fmton the plan file. This could be used down the road for IDE integrations.shykes commentedon Apr 27, 2022
This is very needed, and can we PLEASE add a check for #493 ... For now this is a "wontfix" from upstream CUE and it's easily in my top 3 most painful bugs right now. All it takes is a typo in an imported definition name... and I'll be wasting 30mn of my time, or more, on a wild goose chase trying to understand why my plan isn't working. I bet many developers hit this problem every day without even realizing it - since they have no idea what's wrong. I wouldn't be surprised if people had given up on Dagger altogether because of it. It's just that bad.
aluzzardi commentedon Apr 27, 2022
I think this would be super helpful.
In terms of command/functionality, I think the following are needed (or at least, were requested at some point or another):
verifythe plan is correctevalthe plan (e.g.cue evalwithoutcue)planthe plan: show the list of actions and their dependencies. I don't think we're tracking this but to me it would be super useful to debug. UPDATE: Logged asdagger plancommand #2335lintthe plan Linter for Package Coding Style #2167fmtthe planNow I'm wondering which of these could be combined.
Of those, I think
verifyis the one that doesn't necessarily warrant its own command, could be combined with another (e.g.dagger lint?dagger eval?dagger plan?)Edit: @marcosnils btw, today you kinda can get what you want with
dagger do --helpwhich as a side effect will load the entire plan (to display the list of available actions).[-]✨ Introduce dagger verify command[/-][+]✨ Introduce dagger-cue verify command[/+]marcosnils commentedon Dec 21, 2022
I'll resolve this since we have
dagger-cue --dry-runnow