Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(code): Namespace crates under informalsystems- prefix, add bft suffix #696

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

romac
Copy link
Member

@romac romac commented Dec 18, 2024

Closes: #652

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:

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

which allows import of the form:

use malachitebft_consensus::foobar::*

instead of

use informalsystems_malachitebft_consensus::foobar::*

We are using this internally as well to make imports more readable.
Unfortunately, integration tests (ie. tests under the tests/ directory) do not honor the package flag and must therefore import their own crate under its original name.


PR author checklist

…ft` 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::*
```
@romac romac merged commit 6f4cfce into main Dec 18, 2024
11 checks passed
@romac romac deleted the romac/namespace branch December 18, 2024 10:47
romac added a commit that referenced this pull request Dec 18, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

project: Namespace crates under informalsystems- prefix
1 participant