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

ref: new workspace structure and version management #280

Merged
merged 13 commits into from
Sep 20, 2024
Merged

Conversation

bidzyyys
Copy link
Collaborator

@bidzyyys bidzyyys commented Sep 11, 2024

  • Set motsu version to v0.1.0
  • Improve version management for the workspace
    • contracts, lib/crypto, examples, and benches use version set for the whole workspace
    • motsu, motsu-proc, e2e, e2e-proc have their own version per crate
  • Cleanup dependencies for the workspace
  • Add CI checks for pre-publishing on crates.io
  • Fix issues with publishing motsu to crates.io:
cargo publish -p motsu --target wasm32-unknown-unknown --dry-run
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `motsu-proc` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.

ggonzalez94 and others added 4 commits August 29, 2024 13:23
…267)

Add the rc tag to the docs so we can publish them before the audit. It
should be shown as `0.1.0-rc` on the site. I also made clear in the
warning that this hasn't been audited yet.

Signed-off-by: Gustavo Gonzalez <[email protected]>
Bump version to `0.1.0-rc`.
Bump:
- Stylus SDK to `v0.6.0`
- cargo-stylus to `v0.5.1`
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.8%. Comparing base (d5ed376) to head (9622dc5).
Report is 1 commits behind head on main.

Additional details and impacted files


[dependencies]
const-hex.workspace = true
once_cell.workspace = true
tiny-keccak.workspace = true
stylus-sdk.workspace = true
motsu-proc = { path = "../motsu-proc" }
motsu-proc = "0.1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think If we change smth in motsu-proc crate we need to see those changes inside motsu without publishing crate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to add version altogether with path?

@bidzyyys bidzyyys marked this pull request as draft September 11, 2024 10:56
@bidzyyys bidzyyys changed the base branch from v0.1.0 to main September 11, 2024 11:07
Copy link

netlify bot commented Sep 11, 2024

Deploy Preview for contracts-stylus canceled.

Name Link
🔨 Latest commit 9622dc5
🔍 Latest deploy log https://app.netlify.com/sites/contracts-stylus/deploys/66ea710a46d07b000891610a

@bidzyyys bidzyyys changed the base branch from main to v0.1.0 September 11, 2024 11:40
@bidzyyys bidzyyys changed the base branch from v0.1.0 to main September 11, 2024 12:46
@bidzyyys bidzyyys marked this pull request as ready for review September 18, 2024 06:32
Copy link
Member

@qalisander qalisander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!
Definitely looks better

CARGO_TERM_COLOR: always
jobs:
check-publish:
name: Check publish on crates.io
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks cool!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I would change the pr's name to ref: ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qalisander how about ref: new workspace structure

@bidzyyys bidzyyys changed the title build: set motsu version ref: new workspace structure and version management Sep 18, 2024
Copy link
Collaborator

@ggonzalez94 ggonzalez94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Just left a small comment

with:
target: wasm32-unknown-unknown
components: rust-src
toolchain: nightly-2024-01-01
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We define the version of the toolchain in main places across workflows. I wonder if it would be better to specify it in rust-toolchain.toml file and then:

  • Actions can just use that version
  • Everyone that runs the project locally will use the same version of the toolchain

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@ggonzalez94 ggonzalez94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final question

openzeppelin-stylus = { path = "contracts" }
openzeppelin-crypto = { path = "lib/crypto" }
motsu = { path = "lib/motsu"}
motsu-proc = { path = "lib/motsu-proc", version = "0.1.0" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we set a specific version for motsu-proc? Is this intentional?

Copy link
Collaborator Author

@bidzyyys bidzyyys Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to publish motsu to crates.io; requirement for cargo publish -p motsu --dry-run

Copy link
Collaborator

@ggonzalez94 ggonzalez94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bidzyyys bidzyyys merged commit b1eef80 into main Sep 20, 2024
22 checks passed
@bidzyyys bidzyyys deleted the build/motsu-version branch September 20, 2024 22:32
@bidzyyys bidzyyys mentioned this pull request Sep 21, 2024
2 tasks
qalisander pushed a commit that referenced this pull request Oct 4, 2024
- [x]  Set `motsu` version to `v0.1.0`
- [x] Improve version management for the workspace
- `contracts`, `lib/crypto`, `examples`, and `benches` use version set
for the whole workspace
- `motsu`, `motsu-proc`, `e2e`, `e2e-proc` have their own version per
crate
- [x] Cleanup dependencies for the workspace
- [x] Add CI checks for pre-publishing on crates.io
- [x] Fix issues with publishing `motsu` to crates.io:
```
cargo publish -p motsu --target wasm32-unknown-unknown --dry-run
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `motsu-proc` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.
```

---------

(cherry picked from commit b1eef80)
qalisander pushed a commit that referenced this pull request Oct 9, 2024
- [x]  Set `motsu` version to `v0.1.0`
- [x] Improve version management for the workspace
- `contracts`, `lib/crypto`, `examples`, and `benches` use version set
for the whole workspace
- `motsu`, `motsu-proc`, `e2e`, `e2e-proc` have their own version per
crate
- [x] Cleanup dependencies for the workspace
- [x] Add CI checks for pre-publishing on crates.io
- [x] Fix issues with publishing `motsu` to crates.io:
```
cargo publish -p motsu --target wasm32-unknown-unknown --dry-run
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `motsu-proc` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.
```

---------

(cherry picked from commit b1eef80)
ggonzalez94 pushed a commit that referenced this pull request Oct 14, 2024
- [x]  Set `motsu` version to `v0.1.0`
- [x] Improve version management for the workspace
- `contracts`, `lib/crypto`, `examples`, and `benches` use version set
for the whole workspace
- `motsu`, `motsu-proc`, `e2e`, `e2e-proc` have their own version per
crate
- [x] Cleanup dependencies for the workspace
- [x] Add CI checks for pre-publishing on crates.io
- [x] Fix issues with publishing `motsu` to crates.io:
```
cargo publish -p motsu --target wasm32-unknown-unknown --dry-run
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `motsu-proc` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.
```

---------

(cherry picked from commit b1eef80)
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.

3 participants