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
Item::apply_dry will not work for cases like the following:
FileDownloadItem downloads a tar file.
TarXItem extracts the file.
Currently TarXApplyFns::apply_dry just returns state_goal.clone() as the "successful state", rather than attempting to read the file, and returning whether the dry run fails or signal that the returned state is inaccurate because the file to extract doesn't exist yet.
We need to decide to settle on one of the following:
Keep the API as is -- item implementors cannot assume params / data are usable. Errors returned from each Item count as an execution failure.
Change the signature to know which values are RealOrExample::Real(T) vs RealOrExample::Example(T), and item implementors choose to read external resources for Real<T> variants.
Change the implementation of ItemWrapper::ensure_prepare to call state_goal_try_exec when it is for a dry run, and only call apply_dry if state_goal managed to be fetched.
Tasks
Determine the contract, update Item::apply_dry.
Fix ValueResolutionMode::ApplyDry and peace_data::marker::apply_dry::ApplyDry docs.
Update implementations for all *Items.
The text was updated successfully, but these errors were encountered:
Item::apply_dry
will not work for cases like the following:FileDownloadItem
downloads a tar file.TarXItem
extracts the file.Currently
TarXApplyFns::apply_dry
just returnsstate_goal.clone()
as the "successful state", rather than attempting to read the file, and returning whether the dry run fails or signal that the returned state is inaccurate because the file to extract doesn't exist yet.We need to decide to settle on one of the following:
params
/data
are usable. Errors returned from eachItem
count as an execution failure.RealOrExample::Real(T)
vsRealOrExample::Example(T)
, and item implementors choose to read external resources forReal<T>
variants.ItemWrapper::ensure_prepare
to callstate_goal_try_exec
when it is for a dry run, and only callapply_dry
ifstate_goal
managed to be fetched.Tasks
Item::apply_dry
.ValueResolutionMode::ApplyDry
andpeace_data::marker::apply_dry::ApplyDry
docs.*Item
s.The text was updated successfully, but these errors were encountered: