You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a bug or a feature request 😁 It seems Scarb does not take workspace dev-dependencies into account.
In Alexandria, we have a setup where cario_test is supposed to be inherited from the workspace, as a dev-dependency, but there's no clean way how to do it. Currently, running tests emits a warning. When creating a [workspace.dev-dependencies] section in the main Scarb.toml, it emits an error.
Steps
Clone the latest version of Alexandria - it has just been updated to 2.7.0
cd alexandria/packages/linalg
scarb test
You should see this warning in the console:
scarb test
Running cairo-test alexandria_linalg
warn: `cairo_test` plugin not found
please add the following snippet to your Scarb.toml manifest:
\```
[dev-dependencies]
cairo_test = "2.7.0"
\```
Notice that linalg/Scarb.toml has
[dev-dependencies]
cairo_test.workspace = true
but the main workspace Scarb.toml has cairo_test only in [workspace.dependencies]. This setup works, but results in the warning mentioned above.
Next, edit the main Scarb.toml - remove cairo_test from [workspace.dependencies] and put it into [workspace.dev-dependencies], so that it can be inherited in the linalg package (at least that's how I think it ought to work):
error: failed to parse manifest at: /Users/m/projects/tmp/alexandria/Scarb.toml
Caused by:
0: error inheriting `cairo_test` from workspace root manifest's `workspace.dependencies.cairo_test` 1: dependency `cairo_test` not found in workspace
Problem
This might be a bug or a feature request 😁 It seems Scarb does not take workspace
dev-dependencies
into account.In Alexandria, we have a setup where
cario_test
is supposed to be inherited from the workspace, as a dev-dependency, but there's no clean way how to do it. Currently, running tests emits a warning. When creating a[workspace.dev-dependencies]
section in the main Scarb.toml, it emits an error.Steps
cd alexandria/packages/linalg
scarb test
You should see this warning in the console:
Notice that
linalg/Scarb.toml
hasbut the main workspace Scarb.toml has
cairo_test
only in[workspace.dependencies]
. This setup works, but results in the warning mentioned above.cairo_test
from[workspace.dependencies]
and put it into[workspace.dev-dependencies]
, so that it can be inherited in the linalg package (at least that's how I think it ought to work):scarb test
results in this error:Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: