anchor icon indicating copy to clipboard operation
anchor copied to clipboard

Use workspace dependencies

Open DaviRain-Su opened this issue 1 year ago • 10 comments

DaviRain-Su avatar Jul 09 '23 13:07 DaviRain-Su

@DaviRain-Su is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jul 09 '23 13:07 vercel[bot]

This ensures consistency across crates, but it's not very editor-friendly

Aursen avatar Jul 09 '23 14:07 Aursen

ye, but I also find some project use this form. https://github.com/Sovereign-Labs/sovereign-sdk

The best thing about it is that it no longer maintains local libraries using the "path" approach. This is very user-friendly.

rust blog: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds

DaviRain-Su avatar Jul 09 '23 14:07 DaviRain-Su

Please maintain it like this as much as possible. This is the way I find the readability to be the best.

DaviRain-Su avatar Jul 11 '23 14:07 DaviRain-Su

Please maintain it like this as much as possible. This is the way I find the readability to be the best.

Is there a script you are running to achieve this? We could only maintain this format if we can automate it otherwise this will cause us to waste a lot of time telling people to follow the format.

I like the format too but time > looks.

acheroncrypto avatar Jul 11 '23 16:07 acheroncrypto

I have add dprint.json to format *.toml file. https://dprint.dev/plugins/toml/

DaviRain-Su avatar Jul 12 '23 07:07 DaviRain-Su

CI fails because tests are not part of the root workspace(intentional to not use Cargo.lock).

acheroncrypto avatar Jul 12 '23 20:07 acheroncrypto

that's a bummer w/r/t the tests if u want I can drop a code format check action into CI for dprint/rust/ts in either another pr or this one

cereum avatar Aug 08 '23 21:08 cereum

that's a bummer w/r/t the tests if u want I can drop a code format check action into CI for dprint/rust/ts in either another pr or this one

Yeah, the main advantage would be to get rid of the relative paths but it doesn't seem to be possible with the current structure and given most of the dependencies are used only once, I'm not sure if this PR(as it stands) can be merged 😕.

Formatting with dprint could be useful but it would be another tool that people would need to install.

acheroncrypto avatar Aug 08 '23 22:08 acheroncrypto

If the action is only checking for formatting it becomes on the pr author to run 1-2 curl shell-ish scripts to be able to make it go away. But I get it.

cereum avatar Aug 08 '23 23:08 cereum