Skip to content

Commit b76e4d6

Browse files
authored
Build script cleanups (#9931)
This PR removes unused, commented-out or otherwise spurious code from build script. Also, dependencies were reviewed and cleaned. No functional changes intended.
1 parent 2ed83f2 commit b76e4d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+0
-990
lines changed

Cargo.lock

Lines changed: 0 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/build/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ aws-sdk-ecr = "0.21.0"
1111
aws-sdk-s3 = "0.21.0"
1212
base64 = "0.13.0"
1313
bytes = { workspace = true }
14-
byte-unit = { workspace = true }
1514
chrono = { workspace = true }
1615
clap = { workspace = true }
1716
derivative = { workspace = true }
1817
derive_more = { workspace = true }
1918
dirs = { workspace = true }
2019
futures = { workspace = true }
21-
futures-util = "0.3.17"
2220
glob = "0.3.0"
2321
handlebars = "4.3.5"
2422
heck = "0.4.0"

build/build/examples/experiments.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

build/build/examples/s3.rs

Lines changed: 0 additions & 31 deletions
This file was deleted.

build/build/src/aws.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,6 @@ mod tests {
128128
use super::*;
129129

130130

131-
// #[tokio::test]
132-
// async fn aaa() -> Result {
133-
// let repo = RepoContext::from_str("enso-org/enso")?;
134-
// let paths =
135-
// Paths::new_version(r"H:\NBO\enso", Version::parse("2022.1.1-nightly.2022-01-28")?)?;
136-
// update_manifest(&repo, &paths).await?;
137-
// Ok(())
138-
// }
139-
140131
#[test]
141132
fn updating_manifest() -> Result {
142133
let old_nightly = serde_yaml::from_str::<Manifest>(

build/build/src/bump_version.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

build/build/src/ide/web.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use crate::version::ENSO_VERSION;
99

1010
use anyhow::Context;
1111
use ide_ci::env::known::electron_builder::WindowsSigningCredentials;
12-
use ide_ci::io::download_all;
1312
use ide_ci::program::command::FallibleManipulator;
1413
use ide_ci::programs::node::NpmCommand;
1514
use ide_ci::programs::Npm;
@@ -36,11 +35,6 @@ lazy_static! {
3635
pub static ref BUILD_INFO: PathBuf = PathBuf::from("build.json");
3736
}
3837

39-
pub const IDE_ASSETS_URL: &str =
40-
"https://github.com/enso-org/ide-assets/archive/refs/heads/main.zip";
41-
42-
pub const ARCHIVED_ASSET_FILE: &str = "ide-assets-main/content/assets/";
43-
4438
pub mod env {
4539
use super::*;
4640

@@ -148,16 +142,6 @@ impl FallibleManipulator for IconsArtifacts {
148142
}
149143
}
150144

151-
/// Fill the directory under `output_path` with the assets.
152-
pub async fn download_js_assets(output_path: impl AsRef<Path>) -> Result {
153-
let output = output_path.as_ref();
154-
let archived_asset_prefix = PathBuf::from(ARCHIVED_ASSET_FILE);
155-
let archive = download_all(IDE_ASSETS_URL).await?;
156-
let mut archive = zip::ZipArchive::new(std::io::Cursor::new(archive))?;
157-
ide_ci::archive::zip::extract_subtree(&mut archive, &archived_asset_prefix, output)?;
158-
Ok(())
159-
}
160-
161145
/// Get a relative path to the Project Manager executable in the PM bundle.
162146
pub fn path_to_executable_in_pm_bundle(
163147
artifact: &generated::ProjectManagerBundle,
@@ -370,15 +354,3 @@ impl IdeDesktop {
370354
Ok(())
371355
}
372356
}
373-
374-
#[cfg(test)]
375-
mod tests {
376-
use super::*;
377-
378-
#[tokio::test]
379-
async fn download_test() -> Result {
380-
let temp = TempDir::new()?;
381-
download_js_assets(temp.path()).await?;
382-
Ok(())
383-
}
384-
}

build/build/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ pub mod prelude {
3333
}
3434

3535
pub mod aws;
36-
pub mod bump_version;
3736
pub mod changelog;
3837
pub mod ci;
3938
pub mod ci_gen;

build/build/src/postgres.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -226,27 +226,4 @@ mod tests {
226226
std::mem::forget(child);
227227
Ok(())
228228
}
229-
230-
#[tokio::test]
231-
#[ignore]
232-
async fn test_postgres() -> Result {
233-
// let config = Configuration {
234-
// postgres_container: ContainerId("something".into()),
235-
// endpoint: EndpointConfiguration::deduce()?,
236-
// version: "latest".into(),
237-
// user: "test".into(),
238-
// password: "test".into(),
239-
// database_name: "test".into(),
240-
// };
241-
// let child = Postgresql::start(config).await?;
242-
// std::mem::forget(child);
243-
// // let mut httpbin = get_and_spawn_httpbin_on_free_port().await?;
244-
// Command::new("cmd")
245-
// .args(["/c",
246-
// "H:\\NBO\\enso2\\built-distribution\\enso-engine-0.2.32-SNAPSHOT-windows-amd64\\enso-0.2.
247-
// 32-SNAPSHOT\\bin\\enso", "--no-ir-caches", "--run",
248-
// "H:\\NBO\\enso2\\test\\Database_Tests"]).run_ok().await?; httpbin.process.kill().
249-
// await?;
250-
Ok(())
251-
}
252229
}

build/build/src/project.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ use octocrab::models::repos::Asset;
2525
// ==============
2626

2727
pub mod backend;
28-
pub mod engine;
2928
pub mod gui;
3029
pub mod ide;
31-
pub mod project_manager;
3230
pub mod runtime;
3331
pub mod wasm;
3432

@@ -256,20 +254,6 @@ pub trait IsTarget: Clone + Debug + Sized + Send + Sync + 'static {
256254
todo!("Not implemented for target {self:?}!")
257255
}
258256

259-
// /// Upload the artifact as an asset to the GitHub release.
260-
// fn upload_asset(
261-
// &self,
262-
// release_handle: ReleaseHandle,
263-
// output: impl Future<Output = Result<Self::Artifact>> + Send + 'static,
264-
// ) -> BoxFuture<'static, Result> {
265-
// async move {
266-
// let artifact = output.await?;
267-
// release_handle.upload_compressed_dir(&artifact).await?;
268-
// Ok(())
269-
// }
270-
// .boxed()
271-
// }
272-
273257
fn download_asset(
274258
&self,
275259
context: Context,

0 commit comments

Comments
 (0)