Git dependencies, skip dropping ServeSession

This commit is contained in:
Lucien Greathouse
2022-05-27 19:39:44 -04:00
parent 85f113fcad
commit 86875ab5f2
3 changed files with 26 additions and 5 deletions

6
Cargo.lock generated
View File

@@ -1633,6 +1633,7 @@ dependencies = [
[[package]]
name = "rbx_binary"
version = "0.6.4"
source = "git+https://github.com/rojo-rbx/rbx-dom#4fa99b4190009f417ce63c86b2c6725e32c0090e"
dependencies = [
"log",
"lz4",
@@ -1646,6 +1647,7 @@ dependencies = [
[[package]]
name = "rbx_dom_weak"
version = "2.3.0"
source = "git+https://github.com/rojo-rbx/rbx-dom#4fa99b4190009f417ce63c86b2c6725e32c0090e"
dependencies = [
"rbx_types",
"serde",
@@ -1654,6 +1656,7 @@ dependencies = [
[[package]]
name = "rbx_reflection"
version = "4.2.0"
source = "git+https://github.com/rojo-rbx/rbx-dom#4fa99b4190009f417ce63c86b2c6725e32c0090e"
dependencies = [
"rbx_types",
"serde",
@@ -1662,6 +1665,7 @@ dependencies = [
[[package]]
name = "rbx_reflection_database"
version = "0.2.4+roblox-504"
source = "git+https://github.com/rojo-rbx/rbx-dom#4fa99b4190009f417ce63c86b2c6725e32c0090e"
dependencies = [
"lazy_static",
"rbx_reflection",
@@ -1672,6 +1676,7 @@ dependencies = [
[[package]]
name = "rbx_types"
version = "1.3.0"
source = "git+https://github.com/rojo-rbx/rbx-dom#4fa99b4190009f417ce63c86b2c6725e32c0090e"
dependencies = [
"base64 0.11.0",
"bitflags",
@@ -1685,6 +1690,7 @@ dependencies = [
[[package]]
name = "rbx_xml"
version = "0.12.3"
source = "git+https://github.com/rojo-rbx/rbx-dom#4fa99b4190009f417ce63c86b2c6725e32c0090e"
dependencies = [
"base64 0.11.0",
"log",

View File

@@ -44,11 +44,17 @@ harness = false
memofs = { version = "0.2.0", path = "crates/memofs" }
# These dependencies can be uncommented when working on rbx-dom simultaneously
rbx_binary = { path = "../rbx-dom/rbx_binary" }
rbx_dom_weak = { path = "../rbx-dom/rbx_dom_weak" }
rbx_reflection = { path = "../rbx-dom/rbx_reflection" }
rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
rbx_xml = { path = "../rbx-dom/rbx_xml" }
# rbx_binary = { path = "../rbx-dom/rbx_binary" }
# rbx_dom_weak = { path = "../rbx-dom/rbx_dom_weak" }
# rbx_reflection = { path = "../rbx-dom/rbx_reflection" }
# rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
# rbx_xml = { path = "../rbx-dom/rbx_xml" }
rbx_binary = { git = "https://github.com/rojo-rbx/rbx-dom" }
rbx_dom_weak = { git = "https://github.com/rojo-rbx/rbx-dom" }
rbx_reflection = { git = "https://github.com/rojo-rbx/rbx-dom" }
rbx_reflection_database = { git = "https://github.com/rojo-rbx/rbx-dom" }
rbx_xml = { git = "https://github.com/rojo-rbx/rbx-dom" }
# rbx_binary = "0.6.4"
# rbx_dom_weak = "2.3.0"

View File

@@ -1,5 +1,6 @@
use std::{
io::{BufWriter, Write},
mem::ManuallyDrop,
path::{Path, PathBuf},
};
@@ -61,6 +62,14 @@ impl BuildCommand {
}
}
// Never drop ServeSession, because it's VERY expensive to drop and
// we're about to exit anyways.
//
// This is kind of evil; if this function is ever called outside of the
// context of a CLI, this will leak a large object forever. However, the
// performance benefits of leaking it outweigh the cost at this time.
let _session = ManuallyDrop::new(session);
Ok(())
}
}