Skip to content

[DO NOT MERGE] Test with the 2024 edition #1004

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 12 additions & 12 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ dependencies = [

[[package]]
name = "cargo_toml"
version = "0.18.0"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "802b755090e39835a4b0440fb0bbee0df7495a8b337f63db21e616f7821c7e8c"
checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
dependencies = [
"serde",
"toml",
Expand Down Expand Up @@ -6051,9 +6051,9 @@ dependencies = [

[[package]]
name = "serde_spanned"
version = "0.6.5"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
"serde",
]
Expand Down Expand Up @@ -6735,9 +6735,9 @@ dependencies = [

[[package]]
name = "toml"
version = "0.8.8"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
dependencies = [
"serde",
"serde_spanned",
Expand All @@ -6747,18 +6747,18 @@ dependencies = [

[[package]]
name = "toml_datetime"
version = "0.6.5"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]

[[package]]
name = "toml_edit"
version = "0.21.0"
version = "0.22.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
dependencies = [
"indexmap",
"serde",
Expand Down Expand Up @@ -9291,9 +9291,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"

[[package]]
name = "winnow"
version = "0.5.34"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16"
checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
dependencies = [
"memchr",
]
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exclude = [

[workspace.package]
rust-version = "1.85"
edition = "2021"
edition = "2024"

[workspace.dependencies]
xtask_fuzz = { path = "xtask/xtask_fuzz" }
Expand Down Expand Up @@ -388,7 +388,7 @@ bitfield-struct = "0.7"
bitvec = { version = "1.1", default-features = false }
blocking = "1.2"
caps = "0.5"
cargo_toml = "0.18"
cargo_toml = "0.22"
cc = "1.0"
cfg-if = "1"
clap = "4.2"
Expand Down Expand Up @@ -500,7 +500,7 @@ target-lexicon = "0.12.13"
tempfile = "3.2"
thiserror = { version = "2", default-features = false }
time = "0.3"
toml_edit = "0.21"
toml_edit = "0.22"
tracing = "0.1"
tracing-core = "=0.1.30" # Pin to avoid binary size increase https://github.com/tokio-rs/tracing/issues/3182
tracing-subscriber = "0.3.16"
Expand Down
2 changes: 1 addition & 1 deletion Guide/mdbook-openvmm-shim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[package]
name = "mdbook-openvmm-shim"
edition = "2021"
edition = "2024"

[package.metadata.xtask.house-rules]
# emits a binary, where kebab-case is more natural
Expand Down
4 changes: 3 additions & 1 deletion flowey/flowey_cli/src/cli/debug/dump_stage0_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ impl DumpStage0Dag {
let Some(patchfn) =
flowey_core::patch::patchfn_by_modpath().get(patchfn_name.as_str())
else {
anyhow::bail!("could not find patch with name '{patchfn_name}'. Was it registered with `flowey_core::node::register_patch!`?")
anyhow::bail!(
"could not find patch with name '{patchfn_name}'. Was it registered with `flowey_core::node::register_patch!`?"
)
};
patch_aggregator.apply_patchfn(*patchfn);
}
Expand Down
8 changes: 4 additions & 4 deletions flowey/flowey_cli/src/cli/debug/interrogate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// Licensed under the MIT License.

use crate::cli::FlowBackendCli;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::user_facing::ClaimedGhParam;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::node::FlowArch;
use flowey_core::node::FlowBackend;
use flowey_core::node::FlowPlatform;
use flowey_core::node::GhVarState;
use flowey_core::node::NodeHandle;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::user_facing::ClaimedGhParam;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::pipeline::HostExt;
use flowey_core::pipeline::PipelineBackendHint;
use std::collections::BTreeMap;
Expand Down
8 changes: 4 additions & 4 deletions flowey/flowey_cli/src/cli/exec_snippet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

use crate::cli::FlowBackendCli;
use anyhow::Context;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::user_facing::ClaimedGhParam;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::node::FlowArch;
use flowey_core::node::FlowBackend;
use flowey_core::node::FlowPlatform;
use flowey_core::node::GhVarState;
use flowey_core::node::NodeHandle;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::user_facing::ClaimedGhParam;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::pipeline::HostExt;
use flowey_core::pipeline::PipelineBackendHint;
use serde::Deserialize;
Expand Down
14 changes: 8 additions & 6 deletions flowey/flowey_cli/src/flow_resolver/stage1_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// Licensed under the MIT License.

use anyhow::Context;
use flowey_core::node::read_var_internals;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::user_facing::ClaimedGhParam;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::node::FlowArch;
use flowey_core::node::FlowBackend;
use flowey_core::node::FlowPlatform;
use flowey_core::node::GhVarState;
use flowey_core::node::NodeHandle;
use flowey_core::node::read_var_internals;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::user_facing::ClaimedGhParam;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use parking_lot::Mutex;
use std::collections::BTreeMap;
use std::collections::BTreeSet;
Expand Down Expand Up @@ -534,7 +534,9 @@ pub(crate) fn stage1_dag(
output_graph[idx].1.as_ref().unwrap().step.label()
);
}
log::error!("found buggy node that emitted unreachable steps! use `--viz-mode flow-dot` to debug");
log::error!(
"found buggy node that emitted unreachable steps! use `--viz-mode flow-dot` to debug"
);
Some(FoundUnreachableNodes)
} else {
None
Expand Down
6 changes: 4 additions & 2 deletions flowey/flowey_cli/src/pipeline_resolver/ado_yaml.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use super::common_yaml::FloweySource;
use super::common_yaml::check_generated_yaml_and_json;
use super::common_yaml::job_flowey_bootstrap_source;
use super::common_yaml::write_generated_yaml_and_json;
use super::common_yaml::FloweySource;
use super::generic::ResolvedJobArtifact;
use super::generic::ResolvedJobUseParameter;
use crate::cli::exec_snippet::FloweyPipelineStaticDb;
Expand Down Expand Up @@ -127,7 +127,9 @@ pub fn ado_yaml(
let _ = (artifact, publish);

if ado_bootstrap_template.is_empty() {
anyhow::bail!("Did not specify flowey bootstrap template. Please provide one using `Pipeline::ado_set_flowey_bootstrap_template`")
anyhow::bail!(
"Did not specify flowey bootstrap template. Please provide one using `Pipeline::ado_set_flowey_bootstrap_template`"
)
}

let ado_bootstrap_template = ado_bootstrap_template
Expand Down
12 changes: 9 additions & 3 deletions flowey/flowey_cli/src/pipeline_resolver/direct_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ use crate::pipeline_resolver::generic::ResolvedJobArtifact;
use crate::pipeline_resolver::generic::ResolvedJobUseParameter;
use crate::pipeline_resolver::generic::ResolvedPipeline;
use crate::pipeline_resolver::generic::ResolvedPipelineJob;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::node::FlowArch;
use flowey_core::node::FlowBackend;
use flowey_core::node::FlowPlatform;
use flowey_core::node::NodeHandle;
use flowey_core::node::RuntimeVarDb;
use flowey_core::node::steps::rust::RustRuntimeServices;
use flowey_core::pipeline::internal::Parameter;
use petgraph::prelude::NodeIndex;
use petgraph::visit::EdgeRef;
Expand Down Expand Up @@ -198,10 +198,16 @@ fn direct_run_do_work(
Step::Anchor { .. } => continue,
Step::Rust { label, code, idx } => (label, code, idx),
Step::AdoYaml { .. } => {
anyhow::bail!("{} emitted ADO YAML. Fix the node by checking `ctx.backend()` appropriately", node_handle.modpath())
anyhow::bail!(
"{} emitted ADO YAML. Fix the node by checking `ctx.backend()` appropriately",
node_handle.modpath()
)
}
Step::GitHubYaml { .. } => {
anyhow::bail!("{} emitted GitHub YAML. Fix the node by checking `ctx.backend()` appropriately", node_handle.modpath())
anyhow::bail!(
"{} emitted GitHub YAML. Fix the node by checking `ctx.backend()` appropriately",
node_handle.modpath()
)
}
};
steps.push((idx, label, code.lock().take().unwrap()));
Expand Down
18 changes: 9 additions & 9 deletions flowey/flowey_cli/src/pipeline_resolver/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
// Licensed under the MIT License.

use anyhow::Context;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::node::FlowArch;
use flowey_core::node::FlowPlatform;
use flowey_core::node::NodeHandle;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::patch::ResolvedPatches;
use flowey_core::pipeline::internal::AdoPool;
use flowey_core::pipeline::internal::ArtifactMeta;
use flowey_core::pipeline::internal::InternalAdoResourcesRepository;
use flowey_core::pipeline::internal::Parameter;
use flowey_core::pipeline::internal::ParameterMeta;
use flowey_core::pipeline::internal::PipelineFinalized;
use flowey_core::pipeline::internal::PipelineJobMetadata;
use flowey_core::pipeline::AdoCiTriggers;
use flowey_core::pipeline::AdoPrTriggers;
use flowey_core::pipeline::AdoScheduleTriggers;
Expand All @@ -23,6 +16,13 @@ use flowey_core::pipeline::GhPrTriggers;
use flowey_core::pipeline::GhRunner;
use flowey_core::pipeline::GhScheduleTriggers;
use flowey_core::pipeline::Pipeline;
use flowey_core::pipeline::internal::AdoPool;
use flowey_core::pipeline::internal::ArtifactMeta;
use flowey_core::pipeline::internal::InternalAdoResourcesRepository;
use flowey_core::pipeline::internal::Parameter;
use flowey_core::pipeline::internal::ParameterMeta;
use flowey_core::pipeline::internal::PipelineFinalized;
use flowey_core::pipeline::internal::PipelineJobMetadata;
use std::collections::BTreeMap;
use std::collections::BTreeSet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#![allow(unused)]

use flowey_core::pipeline::GhRunner;
use serde::ser::SerializeMap;
use serde::ser::SerializeSeq;
use serde::Deserialize;
use serde::Serialize;
use serde::Serializer;
use serde::ser::SerializeMap;
use serde::ser::SerializeSeq;
use std::collections::BTreeMap;

/// Valid names may only contain alphanumeric characters and '_' and may not
Expand Down
10 changes: 6 additions & 4 deletions flowey/flowey_cli/src/pipeline_resolver/github_yaml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ use crate::cli::exec_snippet::VAR_DB_SEEDVAR_FLOWEY_WORKING_DIR;
use crate::cli::pipeline::CheckMode;
use crate::flow_resolver::stage1_dag::OutputGraphEntry;
use crate::flow_resolver::stage1_dag::Step;
use crate::pipeline_resolver::common_yaml::job_flowey_bootstrap_source;
use crate::pipeline_resolver::common_yaml::FloweySource;
use crate::pipeline_resolver::common_yaml::job_flowey_bootstrap_source;
use crate::pipeline_resolver::generic::ResolvedPipeline;
use crate::pipeline_resolver::generic::ResolvedPipelineJob;
use anyhow::Context;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::node::FlowArch;
use flowey_core::node::FlowBackend;
use flowey_core::node::FlowPlatform;
use flowey_core::node::FlowPlatformKind;
use flowey_core::node::NodeHandle;
use flowey_core::node::user_facing::GhPermission;
use flowey_core::node::user_facing::GhPermissionValue;
use flowey_core::pipeline::GhRunner;
use flowey_core::pipeline::GhRunnerOsLabel;
use std::collections::BTreeMap;
Expand Down Expand Up @@ -127,7 +127,9 @@ pub fn github_yaml(
// actual artifact publish happens at the end of the job
if let FloweySource::Bootstrap(_artifact, _publish) = &flowey_source {
if gh_bootstrap_template.is_empty() {
anyhow::bail!("Did not specify flowey bootstrap template. Please provide one using `Pipeline::gh_set_flowey_bootstrap_template`")
anyhow::bail!(
"Did not specify flowey bootstrap template. Please provide one using `Pipeline::gh_set_flowey_bootstrap_template`"
)
}

let gh_bootstrap_template = gh_bootstrap_template
Expand Down
10 changes: 5 additions & 5 deletions flowey/flowey_cli/src/pipeline_resolver/viz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,17 @@ pub fn viz_flow_dot(

impl std::fmt::Debug for VizNode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if self.0 .1.is_none() {
return write!(f, "{:?} - ???", self.0 .0);
if self.0.1.is_none() {
return write!(f, "{:?} - ???", self.0.0);
}

let entry = &self.0 .1.as_ref().unwrap();
let entry = &self.0.1.as_ref().unwrap();

write!(
f,
"{}:{}\n\n{}",
self.0 .0.step_idx,
self.0 .0.node.modpath(),
self.0.0.step_idx,
self.0.0.node.modpath(),
match &entry.step {
crate::flow_resolver::stage1_dag::Step::Anchor { label } => {
format!("<anchor:{label}>")
Expand Down
Loading