fiberplane / fp-bindgen

Bindings generator for full-stack WASM plugins
https://fiberplane.dev
Apache License 2.0
475 stars 18 forks source link

cargo_dependency: add git helpers #179

Closed sanderpick closed 1 year ago

sanderpick commented 1 year ago

Howdy!

This change allows use of the git and branch fields on CargoDependency. As far as I can tell, these are unusable w/o a helper because CargoDependency is non exhaustive and immutable.

I'm not sure if it's worth having four methods here. Perhaps with_git_and_branch and with_git_and_branch_and_features is sufficient.

sagacity commented 1 year ago

Thanks for the contribution @sanderpick !

I think having the methods here is fine for now, but we might have to see if we want to move to a more explicit builder pattern in the future. It's a combinatorial explosion waiting to happen otherwise :)

One nitpick though: Could you also update the CHANGELOG.MD to reflect your changes?

sanderpick commented 1 year ago

@sagacity no problem! CHANGELOG.MD updated.

sagacity commented 1 year ago

Sweet! Thanks for your contribution 🥇

sagacity commented 1 year ago

Can you also fix the formatting? cargo fmt --all should do the trick.

Pro-tip: running cargo xtask test will run all these kinds of checks and tests locally as well.

sanderpick commented 1 year ago

@sagacity, I pushed the formatting fix. Thanks for the tips... I'm a few days into rust 👍