From 4bd920bf00ffffc22f7a2c68b171110145512bc5 Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Mon, 4 Oct 2021 00:13:22 +0200 Subject: [PATCH] Fix publish script and compilations in some cicumstances Closes #912 --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- base/src/types/mod.rs | 8 ++++---- scripts/publish.sh | 3 ++- scripts/sync_publish.sh | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) mode change 100644 => 100755 scripts/sync_publish.sh diff --git a/Cargo.lock b/Cargo.lock index 473141486e..d42fd0d2d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1090,7 +1090,7 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "gluon" -version = "0.18.0" +version = "0.18.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index d64f3bda38..8549dbaa56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gluon" -version = "0.18.0" # GLUON +version = "0.18.1" # GLUON authors = ["Markus "] keywords = ["script", "scripting", "language"] build = "build.rs" @@ -49,7 +49,7 @@ serde = { version = "1.0.130", optional = true } serde_state = { version = "0.4.8", optional = true } serde_derive_state = { version = "0.4.10", optional = true } -tokio = { version = "1.12.0", features = ["sync"], optional = true } +tokio = { version = "1.12.0", features = ["sync", "rt"], optional = true } tokio-stream = { version = "0.1", features = ["net"], optional = true } # Binding crates diff --git a/base/src/types/mod.rs b/base/src/types/mod.rs index a165cb2e04..6128abd069 100644 --- a/base/src/types/mod.rs +++ b/base/src/types/mod.rs @@ -1037,10 +1037,6 @@ where } } -#[cfg(target_pointer_width = "64")] -// Safeguard against accidentally growing Type as it is a core type -const _: [(); 8 * 6] = [(); std::mem::size_of::>()]; - impl Type where T: TypePtr, @@ -4628,6 +4624,10 @@ where mod tests { use super::*; + #[cfg(target_pointer_width = "64")] + // Safeguard against accidentally growing Type as it is a core type + const _: [(); 8 * 6] = [(); std::mem::size_of::>()]; + #[test] fn walk_move_types_test() { assert_eq!( diff --git a/scripts/publish.sh b/scripts/publish.sh index dfa61f3b27..6a0b866371 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -33,7 +33,8 @@ for PROJECT in "${PROJECTS[@]}" do PROJECT_PATH=$(echo "$PROJECT" | sed 's/gluon_//' | sed 's/gluon/./') - if ! (sync_publish "${PROJECT_PATH}" -f "$@"); then + if ! (./scripts/sync_publish.sh "$(pwd)/${PROJECT_PATH}" -f "$@"); then + echo "Failed to publish $PROJECT_PATH" exit 1 fi done diff --git a/scripts/sync_publish.sh b/scripts/sync_publish.sh old mode 100644 new mode 100755 index aa8fbf90b2..018ea8e773 --- a/scripts/sync_publish.sh +++ b/scripts/sync_publish.sh @@ -14,7 +14,7 @@ TMP_DIR=/tmp/test1 DIR="$1" FORCE="$2" -NAME=$(grep '^name' "$DIR/Cargo.toml" | sed 's/name = "\([^"]*\)"/\1/') +NAME=$(grep '^name' "$DIR/Cargo.toml" | head -n 1 | sed 's/name = "\([^"]*\)"/\1/') cd "$DIR" VERSION=$(cargo metadata --format-version 1 2>/dev/null | jq -r '.packages[] | select(.name=="'$NAME'").version')