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

forc-pkg: Support workspace-level [patch] table #3958

Closed
mitchmindtree opened this issue Feb 1, 2023 · 1 comment · Fixed by #4086
Closed

forc-pkg: Support workspace-level [patch] table #3958

mitchmindtree opened this issue Feb 1, 2023 · 1 comment · Fixed by #4086
Assignees
Labels
enhancement New feature or request forc forc-pkg Everything related to the `forc-pkg` crate.

Comments

@mitchmindtree
Copy link
Contributor

Currently, I believe our [patch] table support is limited to individual packages (@kayagokalp correct me if I'm wrong 😅).

We should match Rust's behaviour, where [patch] is applied at the workspace level. This is because the workspace is responsible for the overall package graph and lock file, and when a patch needs to be applied to a package in the graph it is most often applicable for all members of the workspace.

@mitchmindtree mitchmindtree added enhancement New feature or request forc forc-pkg Everything related to the `forc-pkg` crate. labels Feb 1, 2023
@kayagokalp
Copy link
Member

This is definitely a must-have! While testing things with huge workspaces (the latest incident was SDK's testing suite workspace 😄) I find myself going in each Forc.toml and adding an explicit std dependency so that I can build with master forc.

@kayagokalp kayagokalp self-assigned this Feb 7, 2023
kayagokalp added a commit that referenced this issue Apr 19, 2023
## Description
closes #3958.

This is a handy feature for tests with workspaces. We were already
supporting a `patch` table feature for packages. This PR adds the same
feature for workspaces. Basically we can patch every instance of a
package with a different version. One main motivation behind this can be
patching the standard library while working with an unreleased version
of `forc`. With this feature we can pin the `std` version for the whole
workspace so that all members in the workspace depending on `std` would
depend on master version of the `std`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc forc-pkg Everything related to the `forc-pkg` crate.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants