cognos: format
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ie85796e5a4eb173faacdb355bdd58ffd6a6a6964
This commit is contained in:
parent
d652faacc2
commit
58a3d68d22
2 changed files with 34 additions and 18 deletions
|
|
@ -11,15 +11,27 @@ pub use aterm::{
|
|||
parse_drv_file,
|
||||
};
|
||||
pub use internal_json::{Actions, Activities, Id, Verbosity};
|
||||
pub use state::{BuildInfo, BuildStatus, Dependencies, Derivation, Host, OutputName, State, ProgressState};
|
||||
pub use state::{
|
||||
BuildInfo,
|
||||
BuildStatus,
|
||||
Dependencies,
|
||||
Derivation,
|
||||
Host,
|
||||
OutputName,
|
||||
ProgressState,
|
||||
State,
|
||||
};
|
||||
|
||||
/// Process a list of actions and return the resulting state
|
||||
#[must_use] pub fn process_actions(actions: Vec<Actions>) -> State {
|
||||
#[must_use]
|
||||
pub fn process_actions(actions: Vec<Actions>) -> State {
|
||||
let mut state = State {
|
||||
progress: ProgressState::JustStarted,
|
||||
derivations: HashMap::new(),
|
||||
builds: HashMap::new(),
|
||||
dependencies: Dependencies { deps: HashMap::new() },
|
||||
dependencies: Dependencies {
|
||||
deps: HashMap::new(),
|
||||
},
|
||||
store_paths: HashMap::new(),
|
||||
dependency_states: HashMap::new(),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -108,7 +108,11 @@ pub struct State {
|
|||
impl State {
|
||||
pub fn imbibe(&mut self, action: Actions) {
|
||||
match action {
|
||||
Actions::Start { id, activity: _activity, .. } => {
|
||||
Actions::Start {
|
||||
id,
|
||||
activity: _activity,
|
||||
..
|
||||
} => {
|
||||
let derivation = Derivation {
|
||||
store_path: PathBuf::from("/nix/store/placeholder"),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue