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

Move forc's util and pkg related code into forc-util, forc-pkg #901

Merged
merged 7 commits into from
Mar 8, 2022

Conversation

mitchmindtree
Copy link
Contributor

This makes a start on #863 by refactoring the "package" handling code
into a forc-pkg crate. This new crate is solely responsible for
building, fetching, locking and updating of forc packages.

forc-pkg pulls in around 170 dependencies altogether, as opposed to
forc's current ~460. This should be useful for downstream crates that
may want to depend on forc without all the bloat of the CLI tooling,
explorer, etc. The sway-lsp crate comes to mind.

To achieve this, some of forc's utility functionality has been moved
into forc-util so that it may be shared between forc-pkg and forc
itself.

This makes a start on #863 by refactoring the "package" handling code
into a `forc-pkg` crate. This new crate is solely responsible for
building, fetching, locking and updating of forc packages.

`forc-pkg` pulls in around 170 dependencies altogether, as opposed to
`forc`'s current ~460. This should be useful for downstream crates that
may want to depend on `forc` without all the bloat of the CLI tooling,
explorer, etc. The `sway-lsp` crate comes to mind.

To achieve this, some of forc's utility functionality has been moved
into `forc-util` so that it may be shared between `forc-pkg` and `forc`
itself.
forc-pkg/Cargo.toml Outdated Show resolved Hide resolved
forc-pkg/Cargo.toml Outdated Show resolved Hide resolved
forc-util/Cargo.toml Outdated Show resolved Hide resolved
Also tweaks the version declarations for forc-pkg dependencies.
forc-pkg/Cargo.toml Outdated Show resolved Hide resolved
forc-pkg/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

lgtm, but I will defer to @sezna or @JoshuaBatty for a second set of eyes

Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

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

Awesome, nice to see a clear distinction between the 2 areas. LGTM

@mitchmindtree mitchmindtree merged commit ecaf5a2 into master Mar 8, 2022
@mitchmindtree mitchmindtree deleted the mitchmindtree/forc-lib branch March 8, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants