Skip to content

Manage dependencies using cargo workspace#16

Merged
mfornet merged 2 commits into
masterfrom
workspace
Oct 12, 2022
Merged

Manage dependencies using cargo workspace#16
mfornet merged 2 commits into
masterfrom
workspace

Conversation

@mfornet
Copy link
Copy Markdown
Member

@mfornet mfornet commented Oct 11, 2022

Use stable version of near-sdk

@mfornet mfornet requested review from birchmd, mooori and sept-en October 11, 2022 18:55
Comment thread Cargo.toml
Comment on lines +29 to +31
tokio = { version = "1", features = ["full"] }
# Feature `unstable` is required for compiling contracts during tests.
workspaces = { version = "0.6", features = ["unstable"] }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does specifying them in workspace.dependencies make them regular dependencies? Previously these (and some others) were only dev-dependencies. At least tokio probably shouldn't become a regular dependency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's what I expect. Notice they are under dev-dependencies on the specific project: [dev-dependencies]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I couldn't find anything on it in cargo docs. Building a contract that uses plugins can be done by:

cd near-plugins/tests/contracts/access_controllable
cargo clean && rm Cargo.lock
make build

Afterwards tokio and other dev-dependencies are not in Cargo.lock. I think that confirms the expected behavior (they're not becoming regular dependencies).

@mfornet mfornet requested a review from mooori October 12, 2022 07:18
@mfornet mfornet merged commit d822c2f into master Oct 12, 2022
This was referenced Mar 27, 2026
This was referenced Apr 7, 2026
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