rpwoodbu / mosh-chrome

Mosh for Chrome
GNU General Public License v3.0
372 stars 59 forks source link

Bazel upgrade Bazel above version 0.20 - Work in progress #211

Closed metrix78 closed 2 years ago

metrix78 commented 3 years ago

Attempt to migrate to the next version higher of Bazel.

Current changes made:

  1. Enable Bazelisk strict mode to help catch migration issues.
  2. Bump protobuf repository from 3.6 series to 3.7.1
metrix78 commented 3 years ago

I'm currently stuck with the following error:

ERROR: /home/metrix/src/mosh-chrome2/mosh_app/BUILD:38:1: error loading package '@mosh//': in /home/metrix/.cache/bazel/_bazel_metrix/4ae6249553a8378740918ba59bbec57a/external/com_google_protobuf/protobuf.bzl: Unable to load package for '@bazel_skylib//lib:versions.bzl': The repository could not be resolved and referenced by '//mosh_app:mosh_version'

Suggestions on what to do/where to look are appreciated.

rpwoodbu commented 2 years ago

I'm currently stuck with the following error:

ERROR: /home/metrix/src/mosh-chrome2/mosh_app/BUILD:38:1: error loading package '@mosh//': in /home/metrix/.cache/bazel/_bazel_metrix/4ae6249553a8378740918ba59bbec57a/external/com_google_protobuf/protobuf.bzl: Unable to load package for '@bazel_skylib//lib:versions.bzl': The repository could not be resolved and referenced by '//mosh_app:mosh_version'

Suggestions on what to do/where to look are appreciated.

The issue was that there were new transitive dependencies in com_google_protobuf, which had to be added to the WORKSPACE file. There was a further subtlety regarding the zlib dependency, which actually crashed Bazel and provided little useful info; that was solved with a little clever renaming and binding.

Thanks for getting me started on this. I was able to get up to Bazel 0.23.0 in SHA 8dc2c57df516f9391555131ecc645c4eab0e2420. The next one is going to be a lot harder because the CROSSTOOL file goes away. That's by far the most complicated part of this build setup. Wish me luck!