-
Notifications
You must be signed in to change notification settings - Fork 54
[feature] Refactor Concurrency #599
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
Changes from all commits
74583fd
a8444c4
2e155d0
4b44ca2
01eb3d3
e2c979c
60697b8
efccf82
9de85fe
9b1bb1f
2a84f2e
b3a4786
56ab186
c0319cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| use anyhow::{anyhow, Result}; | ||
| use eldritch::pb::Tome; | ||
| use std::collections::HashMap; | ||
| use eldritch::runtime::Message; | ||
| use pb::eldritch::Tome; | ||
| use std::{collections::HashMap, fmt::Write}; | ||
|
|
||
| pub async fn install() { | ||
| #[cfg(debug_assertions)] | ||
|
|
@@ -31,17 +32,31 @@ pub async fn install() { | |
| // Run tome | ||
| #[cfg(debug_assertions)] | ||
| log::info!("running tome {embedded_file_path}"); | ||
| let mut runtime = eldritch::start(Tome { | ||
| eldritch, | ||
| parameters: HashMap::new(), | ||
| file_names: Vec::new(), | ||
| }) | ||
| let mut runtime = eldritch::start( | ||
| 0, | ||
| Tome { | ||
| eldritch, | ||
| parameters: HashMap::new(), | ||
| file_names: Vec::new(), | ||
| }, | ||
| ) | ||
| .await; | ||
| runtime.finish().await; | ||
|
|
||
| let _output = runtime.collect_text().join(""); | ||
| #[cfg(debug_assertions)] | ||
| log::info!("{_output}"); | ||
| let mut output = String::new(); | ||
|
|
||
| #[cfg(debug_assertions)] | ||
| for msg in runtime.collect() { | ||
| if let Message::ReportText(m) = msg { | ||
| if let Err(err) = output.write_str(m.text().as_str()) { | ||
| #[cfg(debug_assertions)] | ||
| log::error!("failed to write text: {}", err); | ||
| } | ||
| } | ||
| } | ||
| #[cfg(debug_assertions)] | ||
| log::info!("{output}"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear what's happening here - but I think we want imix install to print in realtime similar to golem.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not change any behavior, but currently this will print all output after evaluation. The |
||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.