From 2bd55a65d6f478c1f93a0c107b5f5c197c2ab045 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 14 Feb 2023 20:22:38 +0100 Subject: [PATCH] Release 0.2.0 alpha.8 (#1304) * Make our web builds cleaner * Bump to 0.2.0-alpha.8 * Explain some things * clippy --- Cargo.lock | 58 +++++++++++++++++------------------ Cargo.toml | 44 +++++++++++++------------- RELEASES.md | 5 +++ crates/re_web_server/build.rs | 3 ++ scripts/build_web.sh | 3 +- scripts/publish_crates.sh | 14 ++++++++- 6 files changed, 74 insertions(+), 53 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ca3d41cd3aa..d4f526987abc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "api_demo" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "clap 4.1.4", @@ -1251,7 +1251,7 @@ dependencies = [ [[package]] name = "dna" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "itertools", "rand", @@ -2789,7 +2789,7 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "minimal" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "rerun", ] @@ -3224,7 +3224,7 @@ dependencies = [ [[package]] name = "objectron" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "clap 4.1.4", @@ -3837,7 +3837,7 @@ dependencies = [ [[package]] name = "raw_mesh" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "bytes", @@ -3879,7 +3879,7 @@ dependencies = [ [[package]] name = "re_analytics" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "crossbeam", @@ -3901,7 +3901,7 @@ dependencies = [ [[package]] name = "re_arrow_store" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "anyhow", @@ -3927,7 +3927,7 @@ dependencies = [ [[package]] name = "re_data_store" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "anyhow", @@ -3950,14 +3950,14 @@ dependencies = [ [[package]] name = "re_error" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", ] [[package]] name = "re_format" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "arrow2", "comfy-table 6.1.4", @@ -3966,7 +3966,7 @@ dependencies = [ [[package]] name = "re_int_histogram" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "criterion", "insta", @@ -3977,7 +3977,7 @@ dependencies = [ [[package]] name = "re_log" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "log-once", "tracing", @@ -3987,7 +3987,7 @@ dependencies = [ [[package]] name = "re_log_types" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4030,7 +4030,7 @@ dependencies = [ [[package]] name = "re_memory" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "backtrace", @@ -4047,7 +4047,7 @@ dependencies = [ [[package]] name = "re_query" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "arrow2", @@ -4070,7 +4070,7 @@ dependencies = [ [[package]] name = "re_renderer" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4122,7 +4122,7 @@ dependencies = [ [[package]] name = "re_sdk" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "arrow2", @@ -4153,7 +4153,7 @@ dependencies = [ [[package]] name = "re_sdk_comms" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4168,7 +4168,7 @@ dependencies = [ [[package]] name = "re_smart_channel" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "crossbeam", "instant", @@ -4176,7 +4176,7 @@ dependencies = [ [[package]] name = "re_string_interner" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "nohash-hasher", @@ -4187,7 +4187,7 @@ dependencies = [ [[package]] name = "re_tensor_ops" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "bytemuck", @@ -4199,7 +4199,7 @@ dependencies = [ [[package]] name = "re_tuid" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "arrow2", "arrow2_convert", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "re_ui" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "eframe", "egui", @@ -4229,7 +4229,7 @@ dependencies = [ [[package]] name = "re_viewer" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4290,7 +4290,7 @@ dependencies = [ [[package]] name = "re_web_server" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "cargo_metadata", @@ -4304,7 +4304,7 @@ dependencies = [ [[package]] name = "re_ws_comms" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "bincode", @@ -4432,7 +4432,7 @@ dependencies = [ [[package]] name = "rerun" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "anyhow", "clap 4.1.4", @@ -4460,7 +4460,7 @@ dependencies = [ [[package]] name = "rerun_py" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "ahash 0.8.2", "arrow2", @@ -4561,7 +4561,7 @@ dependencies = [ [[package]] name = "run_wasm" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" dependencies = [ "cargo-run-wasm", "pico-args", diff --git a/Cargo.toml b/Cargo.toml index 20509db61d6d..2a17510c62ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,30 +10,30 @@ include = ["../../LICENSE-APACHE", "../../LICENSE-MIT", "**/*.rs", "Cargo.toml"] license = "MIT OR Apache-2.0" repository = "https://github.com/rerun-io/rerun" rust-version = "1.67" -version = "0.2.0-alpha.5" +version = "0.2.0-alpha.8" [workspace.dependencies] -re_analytics = { path = "crates/re_analytics", version = "0.2.0-alpha.5" } -re_arrow_store = { path = "crates/re_arrow_store", version = "0.2.0-alpha.5" } -re_data_store = { path = "crates/re_data_store", version = "0.2.0-alpha.5" } -re_error = { path = "crates/re_error", version = "0.2.0-alpha.5" } -re_format = { path = "crates/re_format", version = "0.2.0-alpha.5" } -re_log = { path = "crates/re_log", version = "0.2.0-alpha.5" } -re_log_types = { path = "crates/re_log_types", version = "0.2.0-alpha.5" } -re_memory = { path = "crates/re_memory", version = "0.2.0-alpha.5" } -re_query = { path = "crates/re_query", version = "0.2.0-alpha.5" } -re_renderer = { path = "crates/re_renderer", version = "0.2.0-alpha.5" } -re_sdk = { path = "crates/re_sdk", version = "0.2.0-alpha.5" } -re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.2.0-alpha.5" } -re_smart_channel = { path = "crates/re_smart_channel", version = "0.2.0-alpha.5" } -re_string_interner = { path = "crates/re_string_interner", version = "0.2.0-alpha.5" } -re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.2.0-alpha.5" } -re_tuid = { path = "crates/re_tuid", version = "0.2.0-alpha.5" } -re_ui = { path = "crates/re_ui", version = "0.2.0-alpha.5" } -re_viewer = { path = "crates/re_viewer", version = "0.2.0-alpha.5" } -re_web_server = { path = "crates/re_web_server", version = "0.2.0-alpha.5" } -re_ws_comms = { path = "crates/re_ws_comms", version = "0.2.0-alpha.5" } -rerun = { path = "crates/rerun", version = "0.2.0-alpha.5" } +re_analytics = { path = "crates/re_analytics", version = "0.2.0-alpha.8" } +re_arrow_store = { path = "crates/re_arrow_store", version = "0.2.0-alpha.8" } +re_data_store = { path = "crates/re_data_store", version = "0.2.0-alpha.8" } +re_error = { path = "crates/re_error", version = "0.2.0-alpha.8" } +re_format = { path = "crates/re_format", version = "0.2.0-alpha.8" } +re_log = { path = "crates/re_log", version = "0.2.0-alpha.8" } +re_log_types = { path = "crates/re_log_types", version = "0.2.0-alpha.8" } +re_memory = { path = "crates/re_memory", version = "0.2.0-alpha.8" } +re_query = { path = "crates/re_query", version = "0.2.0-alpha.8" } +re_renderer = { path = "crates/re_renderer", version = "0.2.0-alpha.8" } +re_sdk = { path = "crates/re_sdk", version = "0.2.0-alpha.8" } +re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.2.0-alpha.8" } +re_smart_channel = { path = "crates/re_smart_channel", version = "0.2.0-alpha.8" } +re_string_interner = { path = "crates/re_string_interner", version = "0.2.0-alpha.8" } +re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.2.0-alpha.8" } +re_tuid = { path = "crates/re_tuid", version = "0.2.0-alpha.8" } +re_ui = { path = "crates/re_ui", version = "0.2.0-alpha.8" } +re_viewer = { path = "crates/re_viewer", version = "0.2.0-alpha.8" } +re_web_server = { path = "crates/re_web_server", version = "0.2.0-alpha.8" } +re_ws_comms = { path = "crates/re_ws_comms", version = "0.2.0-alpha.8" } +rerun = { path = "crates/rerun", version = "0.2.0-alpha.8" } anyhow = "1.0" arrow2 = "0.16" diff --git a/RELEASES.md b/RELEASES.md index 9f89bd44f1f7..9603e6b018e6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -102,4 +102,9 @@ First login as https://crates.io/users/rerunio with and API key you get from Emi cargo login $API_KEY ``` +----------------------------------------------------------------------------------------------- +!! IMPORTANT !! Shut off VSCode, and don't touch anything while `publish_crates.sh` is running! +!! IMPORTANT !! Read `publish_crates.sh` for details +----------------------------------------------------------------------------------------------- + ./scripts/publish_crates.sh --execute diff --git a/crates/re_web_server/build.rs b/crates/re_web_server/build.rs index cd31fdc1ff53..296d0de9701a 100644 --- a/crates/re_web_server/build.rs +++ b/crates/re_web_server/build.rs @@ -107,8 +107,11 @@ fn build_web() { std::env!("CARGO_MANIFEST_DIR") ); + // Clean previous version of what we are building: let wasm_path = Path::new(&build_dir).join([crate_name, "_bg.wasm"].concat()); fs::remove_file(wasm_path.clone()).ok(); + let js_path = Path::new(&build_dir).join([crate_name, ".js"].concat()); + fs::remove_file(js_path).ok(); let metadata = MetadataCommand::new() .manifest_path("./Cargo.toml") diff --git a/scripts/build_web.sh b/scripts/build_web.sh index dc9ea0a15a28..796386000cad 100755 --- a/scripts/build_web.sh +++ b/scripts/build_web.sh @@ -63,11 +63,12 @@ export CARGO_ENCODED_RUSTFLAGS="" # Clear output from old stuff: rm -f ${BUILD_DIR}/${CRATE_NAME_SNAKE_CASE}_bg.wasm +rm -f ${BUILD_DIR}/${CRATE_NAME_SNAKE_CASE}.js TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory` # re_web_server/build.rs calls this scripts, so we need to use -# a different target folder to support recursive caergo builds. +# a different target folder to support recursive cargo builds. TARGET_WASM="${TARGET}_wasm" echo "Compiling rust to wasm in folder: ${TARGET_WASM}" diff --git a/scripts/publish_crates.sh b/scripts/publish_crates.sh index 74913a922e83..e25c49b1fe1c 100755 --- a/scripts/publish_crates.sh +++ b/scripts/publish_crates.sh @@ -45,8 +45,20 @@ echo $FLAGS set -x -# IMPORTANT! we need to build an optimized .wasm that will be bundled when we publish re_web_server: +# IMPORTANT! we need to build an optimized .wasm that will be bundled when we publish re_web_server. +# This wasm is built by `re_viewer/build.rs`, which is brittle af. We need to fix ASAP. +# Why so brittle? Because running `cargo check` or having Rust Analyzer running will run +# that build.rs, which will change the built `.wasm` file while this publish script is running. +# SUPER BAD! We need to fix this ASAP, but it is the night before our first release public +# release and I'm tired. Will fix later, mkay? +echo "MAKE SURE RUST ANALYZER IS OFF!" +rm -rf target_wasm # force clean build +rm -f web_viewer/re_viewer_bg.wasm +rm -f web_viewer/re_viewer.js +touch crates/re_viewer/src/lib.rs # force recompile of web server cargo build --release -p re_web_server +# scripts/build_web.sh --release # alternative + # Some of build.rs scripts checks this env-var: export RERUN_IS_PUBLISHING=yes