From dacbdc676a3dee36bf4b4064ad2bcbd4211e0697 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Wed, 29 Jan 2025 18:44:26 -0800 Subject: [PATCH] Don't build when TemporalStasis is added --- web/Cargo.lock | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ web/Cargo.toml | 1 + web/build.rs | 14 +++++-- web/docker-up.sh | 4 ++ 4 files changed, 112 insertions(+), 3 deletions(-) create mode 100755 web/docker-up.sh diff --git a/web/Cargo.lock b/web/Cargo.lock index 6ec5697..e907d9e 100644 --- a/web/Cargo.lock +++ b/web/Cargo.lock @@ -565,6 +565,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "bstr" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "build-target" version = "0.4.0" @@ -786,6 +796,25 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-queue" version = "0.3.11" @@ -1272,6 +1301,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +[[package]] +name = "globset" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + [[package]] name = "h2" version = "0.3.26" @@ -1696,6 +1738,22 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "ignore" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + [[package]] name = "impl-more" version = "0.1.6" @@ -2518,6 +2576,15 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "rerun_except" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89974a5bef01d82b843f85cbab168e8554b3776f875dcc7a66bf03c757db5ab1" +dependencies = [ + "ignore", +] + [[package]] name = "ring" version = "0.17.8" @@ -2679,6 +2746,15 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -3721,6 +3797,7 @@ dependencies = [ "rand", "redis", "reqwest 0.12.12", + "rerun_except", "serde", "serde_json", "serenity", @@ -3735,6 +3812,16 @@ dependencies = [ "windows", ] +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -3871,6 +3958,15 @@ dependencies = [ "wasite", ] +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "windows" version = "0.59.0" diff --git a/web/Cargo.toml b/web/Cargo.toml index 36f3b5f..58df46f 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -86,3 +86,4 @@ opt-level = 3 [build-dependencies] copy_to_output = "2.2.0" build-target = "0.4.0" +rerun_except = "1.0.0" diff --git a/web/build.rs b/web/build.rs index 1c5f01a..d10fe33 100644 --- a/web/build.rs +++ b/web/build.rs @@ -3,8 +3,6 @@ use copy_to_output::copy_to_output_path; use std::{ffi::OsStr, process::Command, time::SystemTime}; fn main() { - println!("cargo:rerun-if-changed=migrations"); - let profile = std::env::var("PROFILE").unwrap(); if profile == "release" { println!( @@ -34,10 +32,20 @@ fn main() { false }; + let mut rerun_ignores = vec![ + "config.yml", + "compose.dev.yaml", + "stasis_version.json", + "static/", + ]; + if !is_redundant && !is_rust_analyzer { - println!("cargo:rerun-if-changed=TemporalStasis"); build_connector(); + } else { + rerun_ignores.push("TemporalStasis/"); } + + rerun_except::rerun_except(&rerun_ignores).expect("rerun_except failed"); } fn build_connector() { diff --git a/web/docker-up.sh b/web/docker-up.sh new file mode 100755 index 0000000..efa9637 --- /dev/null +++ b/web/docker-up.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo systemctl start docker +docker-compose -f compose.dev.yaml up -d \ No newline at end of file