netsec-ethz / bootstrapper

1 stars 4 forks source link

Update Bazel dependencies #27

Closed FR4NK-W closed 2 days ago

FR4NK-W commented 1 week ago

Update rules_go, Gazelle and Bazel Go version Add all tests to module BUILD.bazel

Ignore MODULE.bazel for now

tzaeschke commented 5 days ago

LGTM: This fixes the described issues.

However, some other issues came up as discussed:

Executed 0 out of 2 tests: 2 were skipped. FAILED: Fetching repository @@com_github_stretchr_testify; starting make: *** [Makefile:61: test] Error 1

FR4NK-W commented 2 days ago

Thanks @tzaeschke for those additional comments

However, some other issues came up as discussed:

I believe with the latest commit, also those other points were addressed:

make bootstrapper does not work as documented

I believe it does now, even for different host OSes.

bazel build //:scion-bootstrapper-deb fails because of missing librpm:

I don't believe this is the issue your error message is showing. The error message included in the message above indicates that the build target was not executed, and hence there is no scion-bootstrapper binary to be included in the debian package. There is however an other issue related to the pkg_rpm import that was triggering the detection of a missing rpm toolchain when running the test target. This no longer happens as the tests are called explicitly (see comment on the test target).

make all always executes [...] gazelle

This seems to be an issue with make's dependency resolution, which we weren't able to reproduce. The go_deps.bzl target is never directly called and only executed if there is no go_deps.bzl file.

make all fails

make all includes the test target which was failing in case no rpm toolchain was detected. This is also resolved, see above. If the target package_rpm is explicitly called, we now also make sure to install the rpm toolchain as part of the target.

@tzaeschke : Can you confirm that also those additional points have been addressed?

tzaeschke commented 2 days ago

@FR4NK-W All good, seems to fine :-)