Generate empty repo when path is not set#63
Conversation
Declare an empty repository with empty toolchains and an error message when the path to the NDK was missing.
1abff97 to
7204831
Compare
58dec55 to
ae85507
Compare
|
Note: this doesn't exactly work yet as we'd like to, as it errors with the following message |
|
It would be great to also look at how to add a test for this. It would probably require a new task in .bazelci/presubmit.yml because all the tests will set |
|
Hi, any update on this change? |
|
@ahumesky I finally took the time to make it work as I wanted to. It involves adding a I added two tests in A failure will look like this (when building for Android platforms only): |
When building incrementally, any change to the value of the variable named by name will cause this repository to be re-fetched.
|
Hmm yes expecting a failure in a test like this is tricky, I'm not sure that bazelci is setup up for negative tests. The alternative is to refactor the tests into "bazel within bazel test" integration tests: https://github.com/bazel-contrib/rules_bazel_integration_test I'm not a big fan of those because they tend to very fragile and somewhat slow, but unless bazelci can do this or that's added to bazelci, might be the only option. |
|
Hey folks, anything preventing this PR from being accepted/worked on? This is functionality we'd love to have as we're suffering from the issue described here. Thanks! |
Declare an empty repository with empty toolchains and an error message when the path to the NDK was missing.
Based on a comment from #61 (comment) and a very similar approach to what's done in the starlark version of
rules_android.