bazel: Define tests for everyting tested with Cargo#3205
Conversation
|
Does this mean all tests have to be added to these build files in future, rather than being picked up automatically by cargo? What happens if someone forgets to do that? |
Hey Andrew! Yeah, that's a stark difference... it's the usual Bazel argument that explicit is better than implicit. Whether that works out in practice, I cannot really say as we're only just migrating to Bazel now at Proton.
The test will not be run and nothing will detect this. I guess the mixed setup with both Cargo and Bazel compatibility is making this worse compared to a pure Bazel-based build. There, the developer writing a new test would run Cc @gribozavr as well who probably have thoughts on this. |
|
Gazelle can do some of that automatically, or buildozer can be used to script it |
Oh, weird... I knew of Gazelle for generating build files for Go, but it now also supports Rust: Calsign/gazelle_rust: Gazelle language plugin for Rust. https://github.com/Calsign/gazelle_rust I call it weird since the But thanks for the pointer, we could look into this to save us the trouble of updating this. |
|
I'm mostly using it for Go and it's not awesome per se. I've also done some scripting with buildozer which for basic things might be easy to either run by hand or automate. |
djmitche
left a comment
There was a problem hiding this comment.
These look good!
BTW, there is a Bazel Slack instance with a Rust channel that seems fairly active.
No description provided.