Skip to content

Commit

Permalink
chore(code): Namespace crates under informalsystems- prefix, add `b…
Browse files Browse the repository at this point in the history
…ft` suffix (#696)

* chore(code): Namespace crates under `informalsystems-` prefix, add `bft` suffix

Rename all crates to include a `informalsystems-` prefix and a `bft` suffix to avoid clashes with the existing `malachite` crate.

So `malachite-consensus` would become `informalsystems-malachitebft-consensus`.

It is a mouthful but that can be alleviated in code by specifying a package alias in `Cargo.toml`:

```toml
[dependencies]
malachitebft-consensus = { version = "0.1.0", package = "informalsystems-malachitebft-consensus" }
```

which allows import of the form:

```rust
use malachitebft_consensus::foobar::*
```

instead of

```rust
use informalsystems_malachitebft_consensus::foobar::*
```

* Format and cleanup all Cargo.toml files

* Fix CI

* Remove unused `node` crate

* Do not publish signing and test-cli crates

* Add note in starknet crates
  • Loading branch information
romac authored Dec 18, 2024
1 parent 5fddc56 commit 6f4cfce
Show file tree
Hide file tree
Showing 202 changed files with 1,733 additions and 1,698 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
cargo llvm-cov nextest \
--workspace \
--exclude malachite-test-mbt \
--exclude informalsystems-malachitebft-test-mbt \
--ignore-filename-regex crates/cli \
--all-features \
--no-capture \
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov nextest -p malachite-test-mbt --all-features --lcov --output-path lcov.info
run: cargo llvm-cov nextest -p informalsystems-malachitebft-test-mbt --all-features --lcov --output-path lcov.info
- name: Generate text report
run: cargo llvm-cov report
- name: Upload coverage to Codecov
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
uses: taiki-e/install-action@cargo-nextest
- name: Build code
working-directory: code/crates/test/mbt
run: cargo nextest run -p malachite-test-mbt --all-features --no-run
run: cargo nextest run -p informalsystems-malachitebft-test-mbt --all-features --no-run
- name: Current time as random seed for Quint
run: echo "QUINT_SEED=$(date +%s)" >> $GITHUB_ENV
- name: Run tests
working-directory: code/crates/test/mbt
run: cargo nextest run -p malachite-test-mbt --all-features
run: cargo nextest run -p informalsystems-malachitebft-test-mbt --all-features
14 changes: 12 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ jobs:
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest
- name: Run tests
run: cargo nextest run --workspace --all-features --no-fail-fast --failure-output final --exclude malachite-starknet-test --exclude malachite-discovery-test
run: |
cargo nextest run \
--workspace \
--all-features \
--no-fail-fast \
--failure-output final \
--exclude informalsystems-malachitebft-starknet-test \
--exclude informalsystems-malachitebft-discovery-test
integration:
name: Integration Tests
Expand Down Expand Up @@ -81,7 +88,10 @@ jobs:
- name: Disable apparmor container restrictions
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run integration tests
run: cargo maelstrom --slots 16 -i 'package.match(malachite-starknet-test) || package.match(malachite-discovery-test)'
run: |
cargo maelstrom \
--slots 16 \
--include 'package.match(informalsystems-malachitebft-starknet-test) || package.match(informalsystems-malachitebft-discovery-test)'
clippy:
name: Clippy
Expand Down
Loading

0 comments on commit 6f4cfce

Please sign in to comment.