thrumdev / blobs

Blobchains on Polkadot and Kusama
https://docs-site-pi.vercel.app
Apache License 2.0
64 stars 8 forks source link

xtask: add test local flag #244

Closed gabriele-0201 closed 9 months ago

gabriele-0201 commented 9 months ago

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

gabriele-0201 commented 9 months ago

Yes, you're right in saying that a description would have been needed; this PR is not self-explanatory.

What I wanted to achieve with this was an automatic way to add compilation artifacts to the path without the need to source things before executing tests each time. The name 'local' does not really describe this because local development does not strictly follow the standard cargo default target directories (hence the reason for the CARGO_TARGET_DIR constraint).

I think that a feature like this would be nice, and I discovered a new possible way to do so without relying on default behavior. I would use something like cargo metadata | jq -r '.target_directory' for both the main workspace and the demo-rollup; this would make things shareable between each configuration. How does it seem? Please help me with the name of this flag 😅

pepyakin commented 9 months ago

Why do you think you need a flag for that? Why don't you do it by default, with a possibility to opt-out (a strawman: --no-infer-bin-path)?

And why can't this be used instead of the CI flag?

gabriele-0201 commented 9 months ago

why don't you do it by default, with a possibility to opt-out

Nice! I had not thought about setting it as the default option! Thanks! I thought it might be too intrusive to be as default, but in reality, it's not!

And why can't this be used instead of the CI flag?

Yes, that was the initial idea! To remove the CI and local flags

I will do all of this in separate pr!