From 3f7b31684e552f45f741b83f435a8dc15823431a Mon Sep 17 00:00:00 2001 From: Wodann Date: Mon, 31 Oct 2022 11:58:09 -0500 Subject: [PATCH] improvement: reduce memory size of workspace (#457) --- CHANGELOG.md | 6 +++ crates/mun/Cargo.toml | 8 +-- crates/mun_abi/Cargo.toml | 8 +-- crates/mun_capi_utils/Cargo.toml | 2 +- crates/mun_codegen/Cargo.toml | 36 ++++++------- crates/mun_codegen_macros/Cargo.toml | 6 +-- crates/mun_compiler/Cargo.toml | 24 ++++----- crates/mun_compiler_daemon/Cargo.toml | 8 +-- crates/mun_hir/Cargo.toml | 22 ++++---- crates/mun_language_server/Cargo.toml | 42 +++++++-------- crates/mun_libloader/Cargo.toml | 6 +-- crates/mun_memory/Cargo.toml | 16 +++--- crates/mun_paths/Cargo.toml | 2 +- crates/mun_project/Cargo.toml | 12 ++--- crates/mun_runtime/Cargo.toml | 30 +++++------ crates/mun_runtime/src/lib.rs | 73 ++++++++++++++------------- crates/mun_runtime_capi/Cargo.toml | 8 +-- crates/mun_skeptic/Cargo.toml | 10 ++-- crates/mun_syntax/Cargo.toml | 16 +++--- crates/mun_target/Cargo.toml | 4 +- crates/mun_test/Cargo.toml | 8 +-- crates/mun_vfs/Cargo.toml | 8 +-- crates/tools/Cargo.toml | 6 +-- 23 files changed, 186 insertions(+), 175 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d3cbf183..58b108250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Reduce workspace target folder size from 10.9 GB to 10.6 GB +- Reduce workspace build dependencies from 296 to 270 +- Reduce workspace dev dependencies from 502 to 496 + ## [0.3.0] - 2021-04-12 The third Mun release includes big usability improvements; multi-file projects, a language server with diagnostics and autocompletion, and improvements to robustness and developer workflow to name a few. diff --git a/crates/mun/Cargo.toml b/crates/mun/Cargo.toml index 4cdfd6b1a..5a00e7715 100644 --- a/crates/mun/Cargo.toml +++ b/crates/mun/Cargo.toml @@ -14,10 +14,10 @@ categories = ["command-line-interface", "game-development", "mun"] default-run = "mun" [dependencies] -anyhow = "1.0.31" -clap = { version = "3.1.18", features=["derive"] } -log = "0.4" -pretty_env_logger = "0.4" +anyhow = { version = "1.0.31", default-features = false } +clap = { version = "3.1.18", default-features = false, features = ["std", "derive"] } +log = { version = "0.4", default-features = false } +pretty_env_logger = { version = "0.4", default-features = false } mun_abi = { version = "=0.3.0", path = "../mun_abi" } mun_compiler = { version = "=0.3.0", path = "../mun_compiler" } mun_compiler_daemon = { version = "=0.3.0", path = "../mun_compiler_daemon" } diff --git a/crates/mun_abi/Cargo.toml b/crates/mun_abi/Cargo.toml index a1734f6c5..a52d2d454 100644 --- a/crates/mun_abi/Cargo.toml +++ b/crates/mun_abi/Cargo.toml @@ -14,7 +14,7 @@ categories = ["api-bindings", "game-development", "mun"] [dependencies] once_cell = "1.4.0" -itertools = "0.10.3" -parking_lot = "0.12.0" -extendhash = "1.0.9" -serde = { version="1.0.137", optional = true} +itertools = { version = "0.10.3", default-features = false } +parking_lot = { version = "0.12.0", default-features = false } +extendhash = { version = "1.0.9", default-features = false } +serde = { version = "1.0.137", default-features = false, optional = true } diff --git a/crates/mun_capi_utils/Cargo.toml b/crates/mun_capi_utils/Cargo.toml index 1163ad24d..77ecc1b15 100644 --- a/crates/mun_capi_utils/Cargo.toml +++ b/crates/mun_capi_utils/Cargo.toml @@ -13,4 +13,4 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -insta = { version ="1.12.0", features=["ron"], optional=true} +insta = { version = "1.12.0", default-features = false, features = ["ron"], optional = true } diff --git a/crates/mun_codegen/Cargo.toml b/crates/mun_codegen/Cargo.toml index b5b8d6157..c21d60b71 100644 --- a/crates/mun_codegen/Cargo.toml +++ b/crates/mun_codegen/Cargo.toml @@ -13,30 +13,30 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["Game development", "Mun"] [dependencies] -rustc-hash = "1.1.0" abi = { version = "=0.3.0", path = "../mun_abi", package = "mun_abi" } -bytemuck = "1.4.1" +anyhow = { version = "1.0.31", default-features = false, features = ["std"] } +array-init = { version = "2.0.0", default-features = false } +by_address = { version = "1.0.4", default-features = false } +bytemuck = { version = "1.4.1", default-features = false } hir = { version = "=0.3.0", path = "../mun_hir", package = "mun_hir" } -itertools = "0.10.3" +inkwell = { version = "=0.1.0-beta.4", default-features = false, features = ["llvm12-0", "no-libffi-linking", "target-x86", "target-aarch64"] } +itertools = { version = "0.10.3", default-features = false } mun_codegen_macros = { version = "=0.1.0", path = "../mun_codegen_macros", package = "mun_codegen_macros" } mun_target = { version = "=0.3.0", path = "../mun_target" } -lld_rs = "120.0.1" -anyhow = "1.0.31" -thiserror = "1.0.19" -salsa = "0.16.1" -array-init="2.0.0" -tempfile = "3" -paste = "1.0.7" -parking_lot = "0.12.0" -inkwell = { version = "=0.1.0-beta.4", features = ["llvm12-0", "no-libffi-linking"]} -by_address = "1.0.4" -paths = { version="=0.1.0", path="../mun_paths", package="mun_paths"} -smallvec = { version = "1.6.1", features=["union"] } -once_cell = "1.4.0" +once_cell = { version = "1.4.0", default-features = false } +lld_rs = { version = "120.0.1", default-features = false } +parking_lot = { version = "0.12.0", default-features = false } +paste = { version = "1.0.7", default-features = false } +paths = { version="=0.1.0", path = "../mun_paths", package="mun_paths" } +rustc-hash = { version = "1.1.0", default-features = false } +salsa = { version = "0.16.1", default-features = false } +smallvec = { version = "1.6.1", features = ["union"], default-features = false } +tempfile = { version = "3", default-features = false } +thiserror = { version = "1.0.19", default-features = false } [dev-dependencies] -abi = { path = "../mun_abi", package = "mun_abi", features=["serde"] } -insta = { version="1.12.0", features = ["ron"]} +abi = { path = "../mun_abi", package = "mun_abi", features = ["serde"] } +insta = { version = "1.12.0", default-features = false, features = ["ron"] } libloader = { path = "../mun_libloader", package = "mun_libloader" } mun_test = { path = "../mun_test" } runtime = { path = "../mun_runtime", package = "mun_runtime" } diff --git a/crates/mun_codegen_macros/Cargo.toml b/crates/mun_codegen_macros/Cargo.toml index 53432118a..51fec847a 100644 --- a/crates/mun_codegen_macros/Cargo.toml +++ b/crates/mun_codegen_macros/Cargo.toml @@ -16,6 +16,6 @@ categories = ["Game development", "Mun"] proc-macro = true [dependencies] -proc-macro2 = "1.0" -quote = "1.0" -syn = "1.0" +proc-macro2 = { version = "1.0", default-features = false } +quote = { version = "1.0", default-features = false } +syn = { version = "1.0", default-features = false, features = ["derive", "parsing", "printing", "proc-macro"] } diff --git a/crates/mun_compiler/Cargo.toml b/crates/mun_compiler/Cargo.toml index 4669625f0..5b4288f95 100644 --- a/crates/mun_compiler/Cargo.toml +++ b/crates/mun_compiler/Cargo.toml @@ -13,19 +13,19 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -anyhow = "1.0.31" -mun_codegen = { version = "=0.3.0", path="../mun_codegen" } -mun_syntax = { version = "=0.3.0", path="../mun_syntax" } -hir = { version="=0.3.0", path="../mun_hir", package="mun_hir" } -paths = { version="=0.1.0", path="../mun_paths", package="mun_paths"} -mun_target = { version = "=0.3.0", path="../mun_target" } +hir = { version = "=0.3.0", path = "../mun_hir", package = "mun_hir" } +mun_codegen = { version = "=0.3.0", path = "../mun_codegen" } +mun_syntax = { version = "=0.3.0", path = "../mun_syntax" } +mun_target = { version = "=0.3.0", path = "../mun_target" } mun_project = { version = "=0.1.0", path = "../mun_project" } mun_diagnostics = { version = "=0.1.0", path = "../mun_diagnostics" } -annotate-snippets = { version = "0.9.0", features = ["color"] } -yansi-term = "0.1.2" -walkdir = "2.3" -log = "0.4" -lockfile = "0.4.0" +paths = { version = "=0.1.0", path = "../mun_paths", package = "mun_paths"} +annotate-snippets = { version = "0.9.0", default-features = false, features = ["color"] } +anyhow = { version = "1.0.31", default-features = false } +lockfile = { version = "0.4.0", default-features = false } +log = { version = "0.4", default-features = false } +walkdir = { version = "2.3", default-features = false } +yansi-term = { version = "0.1.2", default-features = false } [dev-dependencies] -insta = "1.12.0" +insta = { version = "1.12.0", default-features = false } diff --git a/crates/mun_compiler_daemon/Cargo.toml b/crates/mun_compiler_daemon/Cargo.toml index fc81a1ad6..41a63d386 100644 --- a/crates/mun_compiler_daemon/Cargo.toml +++ b/crates/mun_compiler_daemon/Cargo.toml @@ -13,11 +13,11 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -anyhow = "1.0.31" +anyhow = { version = "1.0.31", default-features = false } +ctrlc = { version = "3.1", default-features = false } +log = { version = "0.4", default-features = false } mun_codegen = { version = "=0.3.0", path = "../mun_codegen" } mun_compiler = { version = "=0.3.0", path = "../mun_compiler" } mun_project = { version = "=0.1.0", path = "../mun_project" } mun_hir = { version = "=0.3.0", path = "../mun_hir" } -notify = "4.0" -ctrlc = "3.1" -log = "0.4" +notify = { version = "4.0", default-features = false } diff --git a/crates/mun_hir/Cargo.toml b/crates/mun_hir/Cargo.toml index 067386d4e..ad3a9fbc1 100644 --- a/crates/mun_hir/Cargo.toml +++ b/crates/mun_hir/Cargo.toml @@ -13,20 +13,20 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -salsa = "0.16.1" mun_syntax = { version = "=0.3.0", path = "../mun_syntax" } mun_target = { version = "=0.3.0", path = "../mun_target" } paths = { version="=0.1.0", path="../mun_paths", package="mun_paths"} -rustc-hash = "1.1" -once_cell = "1.4.0" -ena = "0.14" -drop_bomb = "0.1.4" -either = "1.5.3" -itertools = "0.10.0" -smallvec = { version = "1.6.1", features=["union"] } +drop_bomb = { version = "0.1.4", default-features = false } +either = { version = "1.5.3", default-features = false } +ena = { version = "0.14", default-features = false } +itertools = { version = "0.10.0", default-features = false } +once_cell = { version = "1.4.0", default-features = false } +rustc-hash = { version = "1.1", default-features = false } +salsa = { version = "0.16.1", default-features = false } +smallvec = { version = "1.6.1", features = ["union"], default-features = false } [dev-dependencies] -insta = "1.12.0" -text_trees = "0.1.2" -parking_lot = "0.12.0" mun_test = { path = "../mun_test" } +insta = { version = "1.12.0", default-features = false } +parking_lot = { version = "0.12.0", default-features = false } +text_trees = { version = "0.1.2", default-features = false } diff --git a/crates/mun_language_server/Cargo.toml b/crates/mun_language_server/Cargo.toml index da6757ddb..06ca1b5b0 100644 --- a/crates/mun_language_server/Cargo.toml +++ b/crates/mun_language_server/Cargo.toml @@ -13,30 +13,30 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -rustc-hash="1.1.0" -lsp-types = "0.93.0" -lsp-server = "0.6.0" -log = "0.4" -serde = "1.0" -serde_json = "1.0" -serde_derive = "1.0" -anyhow = "1.0" -thiserror = "1.0.19" -salsa = "0.16.1" hir = { version = "=0.3.0", path="../mun_hir", package="mun_hir" } -threadpool="1.8.1" -vfs = { version = "=0.1.0", path = "../mun_vfs", package="mun_vfs" } -project = { version = "=0.1.0", path = "../mun_project", package="mun_project" } -mun_target = { version = "=0.3.0", path = "../mun_target" } -mun_syntax = { version = "=0.3.0", path = "../mun_syntax" } mun_diagnostics = { version = "=0.1.0", path = "../mun_diagnostics" } -crossbeam-channel = "0.5.0" -parking_lot = "0.12.0" +mun_syntax = { version = "=0.3.0", path = "../mun_syntax" } +mun_target = { version = "=0.3.0", path = "../mun_target" } paths = { version = "=0.1.0", path="../mun_paths", package="mun_paths"} -ra_ap_text_edit="0.0.132" +project = { version = "=0.1.0", path = "../mun_project", package="mun_project" } +vfs = { version = "=0.1.0", path = "../mun_vfs", package="mun_vfs" } +anyhow = { version = "1.0", default-features = false } +crossbeam-channel = { version = "0.5.0", default-features = false } +log = { version = "0.4", default-features = false } +lsp-types = { version = "0.93.0", default-features = false } +lsp-server = { version = "0.6.0", default-features = false } +parking_lot = { version = "0.12.0", default-features = false } +ra_ap_text_edit = { version = "0.0.132", default-features = false } +rustc-hash = { version = "1.1.0", default-features = false } +salsa = { version = "0.16.1", default-features = false } +serde = { version = "1.0", default-features = false } +serde_derive = { version = "1.0", default-features = false } +serde_json = { version = "1.0", default-features = false } +thiserror = { version = "1.0.19", default-features = false } +threadpool = { version = "1.8.1", default-features = false } [dev-dependencies] -tempdir = "0.3.7" mun_test = { path = "../mun_test"} -insta = "1.12.0" -itertools = "0.10.0" +insta = { version = "1.12.0", default-features = false } +itertools = { version = "0.10.0", default-features = false } +tempdir = { version = "0.3.7", default-features = false } diff --git a/crates/mun_libloader/Cargo.toml b/crates/mun_libloader/Cargo.toml index 919bcb1cc..54e3ca474 100644 --- a/crates/mun_libloader/Cargo.toml +++ b/crates/mun_libloader/Cargo.toml @@ -14,6 +14,6 @@ categories = ["game-development", "mun"] [dependencies] abi = { version = "=0.3.0", path = "../mun_abi", package = "mun_abi" } -anyhow = "1.0" -libloading = "0.7" -tempfile = "3" +anyhow = { version = "1.0", default-features = false, features = ["std"] } +libloading = { version = "0.7", default-features = false } +tempfile = { version = "3", default-features = false } diff --git a/crates/mun_memory/Cargo.toml b/crates/mun_memory/Cargo.toml index 36391f43d..071e82c01 100644 --- a/crates/mun_memory/Cargo.toml +++ b/crates/mun_memory/Cargo.toml @@ -14,15 +14,15 @@ categories = ["game-development", "mun"] [dependencies] abi = { version = "=0.3.0", path = "../mun_abi", package = "mun_abi" } -itertools = "0.10.3" -lazy_static = "1.4.0" -once_cell = "1.4.0" -parking_lot = "0.12.0" -rustc-hash = "1.1" -thiserror = "1.0.19" capi_utils = { version = "=0.1.0", path = "../mun_capi_utils", package= "mun_capi_utils" } +itertools = { version = "0.10.3", default-features = false } +lazy_static = { version = "1.4.0", default-features = false } +once_cell = { version = "1.4.0", default-features = false } +parking_lot = { version = "0.12.0", default-features = false } +rustc-hash = { version = "1.1", default-features = false, features = ["std"] } +thiserror = { version = "1.0.19", default-features = false } [dev-dependencies] -paste = "1.0" capi_utils = { version = "=0.1.0", path = "../mun_capi_utils", package= "mun_capi_utils", features = ["insta"] } -insta = { version = "1.12.0", features = ["ron"]} +insta = { version = "1.12.0", default-features = false, features = ["ron"] } +paste = { version = "1.0", default-features = false } diff --git a/crates/mun_paths/Cargo.toml b/crates/mun_paths/Cargo.toml index f8b21e2e6..b9d7433ed 100644 --- a/crates/mun_paths/Cargo.toml +++ b/crates/mun_paths/Cargo.toml @@ -13,4 +13,4 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -relative-path = "1.2" +relative-path = { version = "1.2", default-features = false } diff --git a/crates/mun_project/Cargo.toml b/crates/mun_project/Cargo.toml index b7bb3c9af..13cd079d6 100644 --- a/crates/mun_project/Cargo.toml +++ b/crates/mun_project/Cargo.toml @@ -13,10 +13,10 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -rustc-hash = "1.1.0" -serde = "1.0" -serde_derive = "1.0" -toml = "0.5" -semver = { version = "1.0", features = ["serde"] } -anyhow = "1.0" paths = { version="=0.1.0", path="../mun_paths", package="mun_paths" } +anyhow = { version = "1.0", default-features = false } +rustc-hash = { version = "1.1.0", default-features = false, features = ["std"] } +semver = { version = "1.0", default-features = false, features = ["serde"] } +serde = { version = "1.0", default-features = false } +serde_derive = { version = "1.0", default-features = false } +toml = { version = "0.5", default-features = false } diff --git a/crates/mun_runtime/Cargo.toml b/crates/mun_runtime/Cargo.toml index cf04a53c6..9a6b8e668 100644 --- a/crates/mun_runtime/Cargo.toml +++ b/crates/mun_runtime/Cargo.toml @@ -14,27 +14,27 @@ categories = ["game-development", "mun"] [dependencies] abi = { version = "=0.3.0", path = "../mun_abi", package = "mun_abi" } -anyhow = "1.0" -itertools = "0.10.3" +capi_utils = { version = "=0.1.0", path = "../mun_capi_utils", package = "mun_capi_utils" } libloader = { version = "=0.1.0", path = "../mun_libloader", package = "mun_libloader" } -log = "0.4" memory = { version = "=0.2.0", path = "../mun_memory", package = "mun_memory" } -capi_utils = { version = "=0.1.0", path = "../mun_capi_utils", package = "mun_capi_utils" } mun_project = { version = "=0.1.0", path = "../mun_project" } -notify = "4.0.12" -once_cell = "1.4.0" -parking_lot = "0.12.0" -rustc-hash = "1.1" -seq-macro = "0.3.0" +anyhow = { version = "1.0", default-features = false } +itertools = { version = "0.10.3", default-features = false, features = ["use_alloc"] } +log = { version = "0.4", default-features = false } +notify = "5.0.0" +once_cell = { version = "1.4.0", default-features = false } +parking_lot = { version = "0.12.0", default-features = false } +rustc-hash = { version = "1.1", default-features = false } +seq-macro = { version = "0.3.0", default-features = false } [dev-dependencies] -bevy = { version = "0.8", default-features = false } -compiler = { version="=0.3.0", path="../mun_compiler", package = "mun_compiler" } -criterion = "0.4" -mlua = { package ="mlua", version="0.8", default-features = false, features=["vendored", "luajit"] } +compiler = { version = "=0.3.0", path = "../mun_compiler", package = "mun_compiler" } mun_test = { path = "../mun_test" } -tempfile = "3" -termcolor = "1.1" +bevy = { version = "0.8", default-features = false } +criterion = { version = "0.4", default-features = false } +mlua = { package = "mlua", version = "0.8", default-features = false, features = ["vendored", "luajit"] } +tempfile = { version = "3", default-features = false } +termcolor = { version = "1.1", default-features = false } wasmer = { version = "2.2.1", default-features = false, features = ["sys-default"] } [[bench]] diff --git a/crates/mun_runtime/src/lib.rs b/crates/mun_runtime/src/lib.rs index 72e950c52..79929195c 100644 --- a/crates/mun_runtime/src/lib.rs +++ b/crates/mun_runtime/src/lib.rs @@ -22,7 +22,7 @@ use memory::{ type_table::TypeTable, }; use mun_project::LOCKFILE_NAME; -use notify::{RawEvent, RecommendedWatcher, RecursiveMode, Watcher}; +use notify::{event::ModifyKind, Event, EventKind, RecommendedWatcher, RecursiveMode, Watcher}; use std::{ collections::{HashMap, VecDeque}, ffi, @@ -163,8 +163,8 @@ pub struct Runtime { dispatch_table: DispatchTable, type_table: TypeTable, watcher: RecommendedWatcher, - watcher_rx: Receiver, - renamed_files: HashMap, + watcher_rx: Receiver>, + renamed_files: HashMap, gc: Arc, } @@ -206,7 +206,9 @@ impl Runtime { dispatch_table.insert_fn(fn_def.prototype.name.clone(), Arc::new(fn_def)); }); - let watcher: RecommendedWatcher = Watcher::new_raw(tx)?; + let watcher: RecommendedWatcher = notify::recommended_watcher(move |res| { + tx.send(res).expect("Failed to send filesystem event.") + })?; let mut runtime = Runtime { assemblies: HashMap::new(), assemblies_to_relink: VecDeque::new(), @@ -379,46 +381,49 @@ impl Runtime { ) } - while let Ok(event) = self.watcher_rx.try_recv() { - if let Some(path) = event.path { - let op = event.op.expect("Invalid event."); - + while let Ok(Ok(event)) = self.watcher_rx.try_recv() { + for path in event.paths { if is_lockfile(&path) { - if op.contains(notify::op::CREATE) { - debug!("Lockfile created"); - } - if op.contains(notify::op::REMOVE) { - debug!("Lockfile deleted"); - - match relink_assemblies(self) { - Ok((dispatch_table, type_table)) => { - info!("Succesfully reloaded assemblies."); - - self.dispatch_table = dispatch_table; - self.type_table = type_table; - self.assemblies_to_relink.clear(); - - return true; + match event.kind { + EventKind::Create(_) => debug!("Lockfile created"), + EventKind::Remove(_) => { + debug!("Lockfile deleted"); + + match relink_assemblies(self) { + Ok((dispatch_table, type_table)) => { + info!("Succesfully reloaded assemblies."); + + self.dispatch_table = dispatch_table; + self.type_table = type_table; + self.assemblies_to_relink.clear(); + + return true; + } + Err(e) => error!("Failed to relink assemblies, due to {}.", e), } - Err(e) => error!("Failed to relink assemblies, due to {}.", e), } + _ => (), } } else { let path = path.canonicalize().unwrap_or_else(|_| { panic!("Failed to canonicalize path: {}.", path.to_string_lossy()) }); - if op.contains(notify::op::RENAME) { - let cookie = event.cookie.expect("Invalid RENAME event."); - if let Some(old_path) = self.renamed_files.remove(&cookie) { - self.assemblies_to_relink.push_back((old_path, path)); - // on_file_changed(self, &old_path, &path); - } else { - self.renamed_files.insert(cookie, path); + match event.kind { + EventKind::Modify(ModifyKind::Name(_)) => { + let tracker = event.attrs.tracker().expect("Invalid RENAME event."); + if let Some(old_path) = self.renamed_files.remove(&tracker) { + self.assemblies_to_relink.push_back((old_path, path)); + // on_file_changed(self, &old_path, &path); + } else { + self.renamed_files.insert(tracker, path); + } + } + EventKind::Modify(_) => { + // TODO: don't overwrite existing + self.assemblies_to_relink.push_back((path.clone(), path)); } - } else if op.contains(notify::op::WRITE) { - // TODO: don't overwrite existing - self.assemblies_to_relink.push_back((path.clone(), path)); + _ => (), } } } diff --git a/crates/mun_runtime_capi/Cargo.toml b/crates/mun_runtime_capi/Cargo.toml index b2f4b3dd0..21a44afa8 100644 --- a/crates/mun_runtime_capi/Cargo.toml +++ b/crates/mun_runtime_capi/Cargo.toml @@ -18,12 +18,12 @@ crate-type = ["cdylib"] [dependencies] abi = { version = "=0.3.0", path = "../mun_abi", package = "mun_abi" } +capi_utils = { version = "=0.1.0", path = "../mun_capi_utils", package = "mun_capi_utils", features = ["insta"] } memory = { version = "=0.2.0", path = "../mun_memory", package = "mun_memory" } runtime = { version = "=0.3.0", path = "../mun_runtime", package = "mun_runtime" } -capi_utils = { version = "=0.1.0", path = "../mun_capi_utils", package = "mun_capi_utils", features=["insta"]} -insta = { version = "1.12.0", features=["ron"] } +insta = { version = "1.12.0", default-features = false, features = ["ron"] } [dev-dependencies] compiler = { path="../mun_compiler", package = "mun_compiler" } -paste = "1.0" -tempfile = "3" +paste = { version = "1.0", default-features = false } +tempfile = { version = "3", default-features = false } diff --git a/crates/mun_skeptic/Cargo.toml b/crates/mun_skeptic/Cargo.toml index b1ad5a0af..0c946a570 100644 --- a/crates/mun_skeptic/Cargo.toml +++ b/crates/mun_skeptic/Cargo.toml @@ -15,10 +15,10 @@ categories = ["game-development", "mun"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +mun_compiler = { version = "=0.3.0", path = "../mun_compiler" } +mun_runtime = { version = "=0.3.0", path = "../mun_runtime" } +bytecount = { version = "0.6.2", default-features = false } +itertools = { version = "0.10.0", default-features = false } mdbook = { version = "0.4.7", default-features = false } pulldown-cmark = { version = "0.9.1", default-features = false } -bytecount = "0.6.2" -itertools = "0.10.0" -mun_runtime = { version = "=0.3.0", path = "../mun_runtime" } -mun_compiler = { version = "=0.3.0", path = "../mun_compiler" } -tempdir = "0.3.7" +tempdir = { version = "0.3.7", default-features = false } diff --git a/crates/mun_syntax/Cargo.toml b/crates/mun_syntax/Cargo.toml index 713ae88b6..51a50446f 100644 --- a/crates/mun_syntax/Cargo.toml +++ b/crates/mun_syntax/Cargo.toml @@ -14,13 +14,13 @@ categories = ["game-development", "mun"] [dependencies] abi = { version = "=0.3.0", path = "../mun_abi", package = "mun_abi" } -rowan = "0.15.5" -text-size = { version = "1.1.0", features = ["serde"] } -smol_str = { version = "0.1.21", features = ["serde"] } -unicode-xid = "0.2.3" -drop_bomb = "0.1.4" -ra_ap_text_edit = "0.0.132" -itertools = "0.10.0" +drop_bomb = { version = "0.1.4", default-features = false } +itertools = { version = "0.10.0", default-features = false } +ra_ap_text_edit = { version = "0.0.132", default-features = false } +rowan = { version = "0.15.5", default-features = false } +smol_str = { version = "0.1.21", default-features = false, features = ["serde", "std"] } +text-size = { version = "1.1.0", default-features = false, features = ["serde"] } +unicode-xid = { version = "0.2.3", default-features = false } [dev-dependencies] -insta = "1.12.0" +insta = { version = "1.12.0", default-features = false } diff --git a/crates/mun_target/Cargo.toml b/crates/mun_target/Cargo.toml index 47775c4c1..660aa0abb 100644 --- a/crates/mun_target/Cargo.toml +++ b/crates/mun_target/Cargo.toml @@ -13,7 +13,7 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -log = "0.4.8" +log = { version = "0.4.8", default-features = false } [dev-dependencies] -insta = "1.12.0" +insta = { version = "1.12.0", default-features = false } diff --git a/crates/mun_test/Cargo.toml b/crates/mun_test/Cargo.toml index 54bafd544..98db4c4a7 100644 --- a/crates/mun_test/Cargo.toml +++ b/crates/mun_test/Cargo.toml @@ -13,10 +13,10 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] -anyhow = "1.0" compiler = { version = "=0.3.0", path = "../mun_compiler", package = "mun_compiler" } -runtime = { version = "=0.3.0", path = "../mun_runtime", package = "mun_runtime" } hir = { version = "=0.3.0", path = "../mun_hir", package = "mun_hir" } paths = { version = "=0.1.0", path = "../mun_paths", package = "mun_paths" } -tempfile = "3" -itertools = "0.10.3" +runtime = { version = "=0.3.0", path = "../mun_runtime", package = "mun_runtime" } +anyhow = { version = "1.0", default-features = false } +itertools = { version = "0.10.3", default-features = false } +tempfile = { version = "3", default-features = false } diff --git a/crates/mun_vfs/Cargo.toml b/crates/mun_vfs/Cargo.toml index 64af3fdd3..fb27a4d17 100644 --- a/crates/mun_vfs/Cargo.toml +++ b/crates/mun_vfs/Cargo.toml @@ -13,9 +13,9 @@ keywords = ["game", "hot-reloading", "language", "mun", "scripting"] categories = ["game-development", "mun"] [dependencies] +paths = { version="=0.1.0", path="../mun_paths", package="mun_paths"} +crossbeam-channel = { version = "0.5.0", default-features = false } +log = { version = "0.4.11", default-features = false } +notify = "5.0.0" rustc-hash = "1.1.0" -notify = "5.0.0-pre.11" -crossbeam-channel = "0.5.0" -log = "0.4.11" walkdir = "2.3.1" -paths = { version="=0.1.0", path="../mun_paths", package="mun_paths"} diff --git a/crates/tools/Cargo.toml b/crates/tools/Cargo.toml index 82e7836a3..4d01e269d 100644 --- a/crates/tools/Cargo.toml +++ b/crates/tools/Cargo.toml @@ -5,10 +5,10 @@ authors = ["The Mun Team "] edition = "2021" [dependencies] -tera = { version = "1.15.0", default-features = false } -clap = { version="3.1.18", features=["derive"] } anyhow = "1.0.31" -ron = "0.8.0" cbindgen = { version = "0.24.3", default-features = false } +clap = { version="3.1.18", features = ["derive"] } difference = "2.0" heck = "0.4.0" +ron = "0.8.0" +tera = { version = "1.15.0", default-features = false }