This repository was archived by the owner on May 18, 2026. It is now read-only.
Replies: 2 comments 3 replies
-
|
|
Beta Was this translation helpful? Give feedback.
3 replies
-
|
I love the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is related to #128.
During the community call (#210) I said that "Plans should never fail".
I believe I was wrong.
If we want plans to show the user an accurate account of what will change on the system, we need to perform tasks that have the potential to error (Canonicalize a path, etc).
As the trait for
planis only to returnVec<Step>- we either return the steps we will action or an empty vector. This needs to change.Instead, I'm proposing that
planreturns something likeResult<Vec<Step>>(This was actually proposed by @zbrox).This makes a lot of sense as we can now emit an error here and tell the user that we failed to plan this action because X, Y, and Z.
However, this isn't enough. Again, referring to @128.
What if a previous action creates a file that is used further down the plan? Should that further action fail because it can't find that file? The answer is no, we should propagate that information throughout the plan. So I'd also like to propose an evolution of
StepandAtom.At the time of writing, these looks like:
All of our Atoms actually map to side effects (FileCreate, FileDelete, FileChmod, etc). We don't make this information available to subsequent actions. As we "plan", we should build up these sideeffects and pass them down - providing a query interface for "Will this file be created prior to this step?"
Beta Was this translation helpful? Give feedback.
All reactions