Skip to content

Commit 3141945

Browse files
committed
misc: fmt
1 parent 0cd0921 commit 3141945

File tree

14 files changed

+64
-32
lines changed

14 files changed

+64
-32
lines changed

build/build/src/aws/ecr/runtime.rs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ mod tests {
8282
let engine_package = generated::EnginePackage::new_root(
8383
root.join("built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev"),
8484
);
85-
let dockerfile = generated::RepoRootToolsCiDockerEngine::new_root(root.join("tools/ci/docker/engine"));
85+
let dockerfile =
86+
generated::RepoRootToolsCiDockerEngine::new_root(root.join("tools/ci/docker/engine"));
8687
let id = build_runtime_image(&dockerfile, &engine_package, tag.to_string()).await?;
8788
info!("Built image: {}", id);
8889
Ok(())
@@ -100,9 +101,14 @@ mod tests {
100101
let root = deduce_repository_path()?;
101102
let root = root.absolutize()?;
102103
info!("Repository root: {}", root.display());
103-
let dockerfile = generated::RepoRootToolsCiDockerYdocServerPolyglot::new_root(root.join("tools/ci/docker/ydoc-server-polyglot"));
104-
let ydoc_native_image = generated::RepoRootLibJavaYdocServerTargetNativeImage::new_root(root.join("lib/java/ydoc-server/target/native-image"));
105-
let id = build_ydoc_polyglot_image(&dockerfile, &ydoc_native_image, tag.to_string()).await?;
104+
let dockerfile = generated::RepoRootToolsCiDockerYdocServerPolyglot::new_root(
105+
root.join("tools/ci/docker/ydoc-server-polyglot"),
106+
);
107+
let ydoc_native_image = generated::RepoRootLibJavaYdocServerTargetNativeImage::new_root(
108+
root.join("lib/java/ydoc-server/target/native-image"),
109+
);
110+
let id =
111+
build_ydoc_polyglot_image(&dockerfile, &ydoc_native_image, tag.to_string()).await?;
106112
info!("Built image: {}", id);
107113
Ok(())
108114
}
@@ -119,11 +125,14 @@ mod tests {
119125
let root = deduce_repository_path()?;
120126
let root = root.absolutize()?;
121127
info!("Repository root: {}", root.display());
122-
let docker_context = generated::RepoRootToolsCiDockerYdocServerNodejs::new_root(root.join("tools/ci/docker/ydoc-server-nodejs"));
123-
let app_ydoc_server_nodejs = generated::RepoRootAppYdocServerNodejs::new_root(root.join("app/ydoc-server-nodejs"));
124-
let id = build_ydoc_nodejs_image(&docker_context, &app_ydoc_server_nodejs, tag.to_string()).await?;
128+
let docker_context = generated::RepoRootToolsCiDockerYdocServerNodejs::new_root(
129+
root.join("tools/ci/docker/ydoc-server-nodejs"),
130+
);
131+
let app_ydoc_server_nodejs =
132+
generated::RepoRootAppYdocServerNodejs::new_root(root.join("app/ydoc-server-nodejs"));
133+
let id = build_ydoc_nodejs_image(&docker_context, &app_ydoc_server_nodejs, tag.to_string())
134+
.await?;
125135
info!("Built image: {}", id);
126136
Ok(())
127137
}
128-
129138
}

build/build/src/ci_gen/job.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use core::panic;
2-
31
use crate::prelude::*;
42

53
use crate::ci_gen::not_default_branch;
@@ -15,6 +13,7 @@ use crate::engine::env;
1513
use crate::ide::web::env::VITE_ENSO_AG_GRID_LICENSE_KEY;
1614
use crate::ide::web::env::VITE_ENSO_MAPBOX_API_TOKEN;
1715

16+
use core::panic;
1817
use ide_ci::actions::workflow::definition::cancel_workflow_action;
1918
use ide_ci::actions::workflow::definition::shell;
2019
use ide_ci::actions::workflow::definition::Access;
@@ -452,7 +451,8 @@ pub struct DeployRuntime;
452451

453452
impl JobArchetype for DeployRuntime {
454453
fn job(&self, target: Target) -> Job {
455-
ecr_deploy_steps_builder("release deploy-runtime").build_job("Upload Runtime to ECR", target)
454+
ecr_deploy_steps_builder("release deploy-runtime")
455+
.build_job("Upload Runtime to ECR", target)
456456
}
457457
}
458458

@@ -461,7 +461,8 @@ pub struct DeployYdocPolyglot;
461461

462462
impl JobArchetype for DeployYdocPolyglot {
463463
fn job(&self, target: Target) -> Job {
464-
ecr_deploy_steps_builder("release deploy-ydoc-polyglot").build_job("Upload polyglot Ydoc to ECR", target)
464+
ecr_deploy_steps_builder("release deploy-ydoc-polyglot")
465+
.build_job("Upload polyglot Ydoc to ECR", target)
465466
}
466467
}
467468

@@ -470,20 +471,17 @@ pub struct DeployYdocNodejs;
470471

471472
impl JobArchetype for DeployYdocNodejs {
472473
fn job(&self, target: Target) -> Job {
473-
ecr_deploy_steps_builder("release deploy-ydoc-nodejs").build_job("Upload Node.js Ydoc to ECR", target)
474+
ecr_deploy_steps_builder("release deploy-ydoc-nodejs")
475+
.build_job("Upload Node.js Ydoc to ECR", target)
474476
}
475477
}
476478

477479
fn ecr_deploy_steps_builder(run_command: impl Into<String>) -> RunStepsBuilder {
478-
RunStepsBuilder::new(run_command)
479-
.customize(|step| {
480+
RunStepsBuilder::new(run_command).customize(|step| {
480481
vec![step
481482
.with_secret_exposed_as(secret::CI_PRIVATE_TOKEN, ide_ci::github::GITHUB_TOKEN)
482483
.with_env("ENSO_BUILD_ECR_REPOSITORY", crate::aws::ecr::runtime::NAME)
483-
.with_secret_exposed_as(
484-
secret::ECR_PUSH_RUNTIME_ACCESS_KEY_ID,
485-
"AWS_ACCESS_KEY_ID",
486-
)
484+
.with_secret_exposed_as(secret::ECR_PUSH_RUNTIME_ACCESS_KEY_ID, "AWS_ACCESS_KEY_ID")
487485
.with_secret_exposed_as(
488486
secret::ECR_PUSH_RUNTIME_SECRET_ACCESS_KEY,
489487
"AWS_SECRET_ACCESS_KEY",

build/build/src/cloud_tests/env.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
33
use ide_ci::define_env_var;
44

5+
6+
57
pub mod ci_config {
68
use super::*;
79

build/build/src/cloud_tests/mod.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
//! Module that allows to create an Enso Cloud compatible credentials file from
22
//! a configuration stored in environment variables.
33
4-
pub mod env;
4+
use crate::prelude::*;
55

66
use anyhow::Ok;
7-
use tempfile::NamedTempFile;
8-
9-
use crate::prelude::*;
107
use std::fs::File;
118
use std::io::Write;
9+
use tempfile::NamedTempFile;
10+
11+
12+
// ==============
13+
// === Export ===
14+
// ==============
15+
16+
pub mod env;
17+
18+
1219

1320
pub fn build_auth_config_from_environment() -> Result<AuthConfig> {
1421
let web_client_id = env::ci_config::ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID.get()?;

build/build/src/enso.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use crate::cloud_tests;
21
use crate::prelude::*;
32

3+
use crate::cloud_tests;
44
use crate::engine::StandardLibraryTestsSelection;
55
use crate::paths::Paths;
66
use crate::paths::ENSO_ENABLE_ASSERTIONS;

build/build/src/ide/web.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ use sha2::Digest;
1717
use std::process::Stdio;
1818
use tempfile::TempDir;
1919

20+
21+
2022
// ==============
2123
// === Export ===
2224
// ==============

build/build/src/project/gui.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use crate::source::WithDestination;
1414

1515
use ide_ci::ok_ready_boxed;
1616

17+
18+
1719
// ================
1820
// === Artifact ===
1921
// ================

build/build/src/release.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Support code for managing Enso releases.
22
3-
use crate::engine;
43
use crate::prelude::*;
54

65
use crate::changelog::Changelog;
76
use crate::context::BuildContext;
7+
use crate::engine;
88
use crate::env::ENSO_ADMIN_TOKEN;
99
use crate::paths::generated;
1010
use crate::paths::TargetTriple;
@@ -296,8 +296,8 @@ pub async fn deploy_runtime_to_ecr(context: &BuildContext, repository: String) -
296296
/// Builds the polyglot Ydoc image and pushes it to our ECR.
297297
pub async fn deploy_ydoc_polyglot_to_ecr(context: &BuildContext, repository: String) -> Result {
298298
let sbt = engine::sbt::Context {
299-
repo_root: context.repo_root.path.clone(),
300-
system_properties: default()
299+
repo_root: context.repo_root.path.clone(),
300+
system_properties: default(),
301301
};
302302
sbt.call_arg("ydoc-server/buildNativeImage").await?;
303303
let client = crate::aws::ecr::client_from_env().await;

build/build/src/rust/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ use ide_ci::programs::javac;
88
use ide_ci::programs::Cargo;
99
use ide_ci::programs::Java;
1010
use ide_ci::programs::Javac;
11-
1211
use std::fs;
1312
use std::path::Path;
1413

14+
15+
1516
const GENERATOR_CRATE_NAME: &str = "enso-parser-generate-java";
1617
const GENERATOR_BIN_NAME: &str = GENERATOR_CRATE_NAME;
1718
const TEST_GENERATOR_BIN_NAME: &str = "java-tests";

build/ci_utils/src/future.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use crate::prelude::*;
2+
23
use futures::future::OptionFuture;
34

5+
6+
47
#[derive(Copy, Clone, Debug)]
58
pub enum AsyncPolicy {
69
Sequential,

build/ci_utils/src/os/target.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
33
use std::fmt;
44

5+
6+
57
pub const TARGET_ARCH: Arch = Arch::from_str(std::env::consts::ARCH);
68
pub const TARGET_OS: OS = OS::from_str(std::env::consts::OS);
79

build/install/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! This crate is linked in both by the installer and the uninstaller.
22
3+
4+
35
pub mod prelude {
46
pub use ide_ci::prelude::*;
57

build/macros/lib/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
// ==============
2+
// === Export ===
3+
// ==============
4+
15
pub mod paths;

build/macros/lib/src/paths.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
use convert_case::Case;
2-
use convert_case::Casing;
31
use derive_more::*;
42
use enso_build_base::prelude::*;
3+
4+
use convert_case::Case;
5+
use convert_case::Casing;
56
use itertools::Itertools;
67
use proc_macro2::Span;
78
use proc_macro2::TokenStream;
89
use quote::quote;
9-
use syn::Ident;
10-
1110
use regex::Regex;
1211
use std::iter::zip;
12+
use syn::Ident;
1313

1414

1515

0 commit comments

Comments
 (0)