diff --git a/.builds/beta.yml b/.builds/beta.yml index 722b3396..0b5c350d 100644 --- a/.builds/beta.yml +++ b/.builds/beta.yml @@ -24,4 +24,14 @@ tasks: cargo test --all --verbose test_exit=$? - exit $(( $fmt_exit || $clippy_exit || $test_exit )) + # ruma-identifiers has a bunch of features. Make sure it works both with + # all of them and none of them being enabled. + cd ruma-identifiers + + cargo test --no-default-features --verbose + id_test_1_exit=$? + + cargo test --all-features --verbose + id_test_2_exit=$? + + exit $(( $fmt_exit || $clippy_exit || $test_exit || $id_test_1_exit || $id_test_2_exit )) diff --git a/.builds/stable.yml b/.builds/stable.yml index 98da58d5..ecb28ee4 100644 --- a/.builds/stable.yml +++ b/.builds/stable.yml @@ -24,6 +24,16 @@ tasks: cargo test --all --verbose test_exit=$? - exit $(( $fmt_exit || $clippy_exit || $test_exit )) + # ruma-identifiers has a bunch of features. Make sure it works both with + # all of them and none of them being enabled. + cd ruma-identifiers + + cargo test --no-default-features --verbose + id_test_1_exit=$? + + cargo test --all-features --verbose + id_test_2_exit=$? + + exit $(( $fmt_exit || $clippy_exit || $test_exit || $id_test_1_exit || $id_test_2_exit )) # TODO: Add audit task once cargo-audit binary releases are available. # See https://github.com/RustSec/cargo-audit/issues/66 diff --git a/Cargo.toml b/Cargo.toml index b2f5e08c..d93b7df8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,2 +1,8 @@ [workspace] members = ["ruma", "ruma-*"] + +# Required until ruma-events becomes part of the workspace +[patch.crates-io] +ruma-common = { path = "ruma-common" } +ruma-identifiers = { path = "ruma-identifiers" } +ruma-serde = { path = "ruma-serde" } diff --git a/ruma-api/Cargo.toml b/ruma-api/Cargo.toml index 56ffca99..76492875 100644 --- a/ruma-api/Cargo.toml +++ b/ruma-api/Cargo.toml @@ -19,7 +19,7 @@ edition = "2018" http = "0.2.1" percent-encoding = "2.1.0" ruma-api-macros = { version = "=0.16.1", path = "../ruma-api-macros" } -ruma-identifiers = "0.16.2" +ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } ruma-serde = { version = "0.2.0", path = "../ruma-serde" } serde = { version = "1.0.111", features = ["derive"] } serde_json = "1.0.53" diff --git a/ruma-appservice-api/Cargo.toml b/ruma-appservice-api/Cargo.toml index dab217c9..ff7f1ee7 100644 --- a/ruma-appservice-api/Cargo.toml +++ b/ruma-appservice-api/Cargo.toml @@ -14,7 +14,7 @@ edition = "2018" [dependencies] ruma-api = "0.16.1" ruma-events = { git = "https://github.com/ruma/ruma-events", rev = "c1ee72d" } -ruma-identifiers = "0.16.2" +ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } serde = { version = "1.0.111", features = ["derive"] } serde_json = "1.0.52" url = { version = "2.1.1", features = ["serde"] } diff --git a/ruma-client-api/Cargo.toml b/ruma-client-api/Cargo.toml index eed62393..20d0ce59 100644 --- a/ruma-client-api/Cargo.toml +++ b/ruma-client-api/Cargo.toml @@ -22,7 +22,7 @@ js_int = { version = "0.1.5", features = ["serde"] } ruma-api = { version = "0.16.1", path = "../ruma-api" } ruma-common = { version = "0.1.3", path = "../ruma-common" } ruma-events = { git = "https://github.com/ruma/ruma-events", rev = "c1ee72d" } -ruma-identifiers = "0.16.2" +ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } ruma-serde = { version = "0.2.2", path = "../ruma-serde" } serde = { version = "1.0.111", features = ["derive"] } serde_json = "1.0.53" diff --git a/ruma-federation-api/Cargo.toml b/ruma-federation-api/Cargo.toml index 2c6d0698..94bb6889 100644 --- a/ruma-federation-api/Cargo.toml +++ b/ruma-federation-api/Cargo.toml @@ -20,7 +20,7 @@ js_int = "0.1.5" matches = "0.1.8" ruma-api = { version = "0.16.1", path = "../ruma-api" } ruma-events = { git = "https://github.com/ruma/ruma-events", rev = "c1ee72d" } -ruma-identifiers = "0.16.2" +ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } ruma-serde = "0.2.2" serde = { version = "1.0.111", features = ["derive"] } serde_json = "1.0.53" diff --git a/ruma-identifiers/.builds/beta.yml b/ruma-identifiers/.builds/beta.yml deleted file mode 100644 index ad2e33a7..00000000 --- a/ruma-identifiers/.builds/beta.yml +++ /dev/null @@ -1,30 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-identifiers -tasks: - - rustup: | - # We specify --profile minimal because we'd otherwise download docs - rustup toolchain install beta --profile minimal -c rustfmt -c clippy - rustup default beta - - test: | - cd ruma-identifiers - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - cargo fmt -- --check - fmt_exit=$? - - cargo clippy --all-targets --all-features -- -D warnings - clippy_exit=$? - - cargo test --no-default-features --verbose - test1_exit=$? - - cargo test --all-features --verbose - test2_exit=$? - - exit $(( $fmt_exit || $clippy_exit || $test1_exit || $test2_exit )) diff --git a/ruma-identifiers/.builds/msrv.yml b/ruma-identifiers/.builds/msrv.yml deleted file mode 100644 index 4e7eb631..00000000 --- a/ruma-identifiers/.builds/msrv.yml +++ /dev/null @@ -1,26 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-identifiers -tasks: - - rustup: | - # We specify --profile minimal because we'd otherwise download docs - rustup toolchain install 1.42.0 --profile minimal - rustup default 1.42.0 - - test: | - cd ruma-identifiers - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - # Only make sure the code builds with the MSRV. Tests can require later - # Rust versions, don't compile or run them. - cargo build --no-default-features --verbose - build1_exit=$? - - cargo build --all-features --verbose - build2_exit=$? - - exit $(( $build1_exit || $build2_exit )) diff --git a/ruma-identifiers/.builds/nightly.yml b/ruma-identifiers/.builds/nightly.yml deleted file mode 100644 index e119912a..00000000 --- a/ruma-identifiers/.builds/nightly.yml +++ /dev/null @@ -1,32 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-identifiers -tasks: - - rustup: | - rustup toolchain install nightly --profile minimal - rustup default nightly - - # Try installing rustfmt & clippy for nightly, but don't fail the build - # if they are not available - rustup component add rustfmt || true - rustup component add clippy || true - - test: | - cd ruma-identifiers - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - if ( rustup component list | grep -q rustfmt ); then - cargo fmt -- --check - fi - fmt_exit=$? - - if ( rustup component list | grep -q clippy ); then - cargo clippy --all-targets --all-features -- -D warnings - fi - clippy_exit=$? - - exit $(( $fmt_exit || $clippy_exit )) diff --git a/ruma-identifiers/.builds/stable.yml b/ruma-identifiers/.builds/stable.yml deleted file mode 100644 index 57620ca8..00000000 --- a/ruma-identifiers/.builds/stable.yml +++ /dev/null @@ -1,32 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-identifiers -tasks: - - rustup: | - # We specify --profile minimal because we'd otherwise download docs - rustup toolchain install stable --profile minimal -c rustfmt -c clippy - rustup default stable - - test: | - cd ruma-identifiers - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - cargo fmt -- --check - fmt_exit=$? - - cargo clippy --all-targets --all-features -- -D warnings - clippy_exit=$? - - cargo test --no-default-features --verbose - test1_exit=$? - - cargo test --all-features --verbose - test2_exit=$? - - exit $(( $fmt_exit || $clippy_exit || $test1_exit || $test2_exit )) - # TODO: Add audit task once cargo-audit binary releases are available. - # See https://github.com/RustSec/cargo-audit/issues/66 diff --git a/ruma-identifiers/.gitignore b/ruma-identifiers/.gitignore deleted file mode 100644 index 06aba01b..00000000 --- a/ruma-identifiers/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Cargo.lock -/target diff --git a/ruma-identifiers/Cargo.toml b/ruma-identifiers/Cargo.toml index 79c77ff0..ed81a4a5 100644 --- a/ruma-identifiers/Cargo.toml +++ b/ruma-identifiers/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" name = "ruma-identifiers" readme = "README.md" repository = "https://github.com/ruma/ruma-identifiers" -version = "0.16.1" +version = "0.16.2" edition = "2018" [package.metadata.docs.rs] diff --git a/ruma/Cargo.toml b/ruma/Cargo.toml index c1cbcf14..5410beb0 100644 --- a/ruma/Cargo.toml +++ b/ruma/Cargo.toml @@ -22,7 +22,7 @@ federation-api = ["ruma-api", "ruma-federation-api", "ruma-signatures"] [dependencies] ruma-common = { version = "0.1.3", path = "../ruma-common" } -ruma-identifiers = { version = "0.16.2", features = ["serde"] } +ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers", features = ["serde"] } ruma-events = { git = "https://github.com/ruma/ruma-events", rev = "c1ee72d", optional = true } ruma-signatures = { version = "0.6.0-dev.1", path = "../ruma-signatures", optional = true }