bazel

Solve dependency issue when using gRPC cpp in bazel

[亡魂溺海] 提交于 2021-01-04 07:14:48
问题 I am trying to run a simple program with gRPC in dependency. I tried several examples but continuesly get the following error: ERROR: /home/git/examples/WORKSPACE:1:1: name 'git_repository' is not defined ERROR: Error evaluating WORKSPACE file This is my bazel version: ➜ git:(master) ✗ bazel version Build label: 0.23.2 And this is the workspace file content: git_repository( name = "com_github_grpc_grpc", commit = "ac0808b107d73613191b66617a547a201871a845", remote = "https://github.com/grpc

Bazel + Angular + SocketIO Causes: Uncaught TypeError: XMLHttpRequest is not a constructor

旧时模样 提交于 2021-01-02 05:10:54
问题 I want to add ngx-socket-io to my Angular application. I use Bazel to run my Angular dev-server. Unfortunately ngx-socket-io doesn't seem to work with the ts_devserver out of the box. I get this error in the browser console: Uncaught TypeError: XMLHttpRequest is not a constructor at ts_scripts.js?v=1587802098203:16776 at Object.23.../transport (ts_scripts.js?v=1587802098203:16780) at o (ts_scripts.js?v=1587802098203:11783) It seems to be caused by xmlhttprequest-ssl which is a dependency of

How to use the vscode python debugger with a project built with bazel?

倾然丶 夕夏残阳落幕 提交于 2020-12-12 11:11:55
问题 I want to debug a python file which has a few dependencies that only appear in the runfiles from bazel. How can I debug a bazel build with the vscode debugger? 回答1: As someone famous said, "Yes, we can". You would need to use the "ptvsd" python package. One-time Setup Add "ptvsd" as a Python dependency in Bazel In VS Code, in your launch.json file, add the following configuration: { "name": "Python: Attach", "type": "python", "request": "attach", "port": 5724, "host": "localhost" }, Debug

How to use the vscode python debugger with a project built with bazel?

蹲街弑〆低调 提交于 2020-12-12 11:10:21
问题 I want to debug a python file which has a few dependencies that only appear in the runfiles from bazel. How can I debug a bazel build with the vscode debugger? 回答1: As someone famous said, "Yes, we can". You would need to use the "ptvsd" python package. One-time Setup Add "ptvsd" as a Python dependency in Bazel In VS Code, in your launch.json file, add the following configuration: { "name": "Python: Attach", "type": "python", "request": "attach", "port": 5724, "host": "localhost" }, Debug

Ubuntu20.04 构建并运行ONOS

▼魔方 西西 提交于 2020-12-08 20:00:52
一、安装 Bazel 在 Ubuntu 上安装Bazel有以下几种方式: 通过 npm 安装 npm install -g @bazel/bazelisk 这种方式需要安装 nodejs ,命令为 sudo apt install nodejs 使用 Bazel 的 apt 仓库 步骤1:将 Bazel 发行版 URI 添加为包源 sudo apt install curl gnupg curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg sudo mv bazel.gpg /etc/apt/trusted.gpg.d/ echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list 步骤2:安装和更新Bazel sudo apt update && sudo apt install bazel 二、获取ONOS源码 确保已安装git,然后创建源存储库的本地克隆: git clone https://gerrit.onosproject.org/onos 如果下载比较慢,可以通过gitee

Bazel remote cache analysis data

 ̄綄美尐妖づ 提交于 2020-12-06 08:24:23
问题 I am running bazel (via bazelisk) inside a docker container on jenkins. Furthermore I use a remote cache. On subsequent runs with no changes I get 100% cache hits, but the analysis phase (~60seconds) runs everytime a new container is created. Is there a way to cache the analysis data remotely aswell or am I forced to run bazel directly on the jenkins agent so it doesn't shut itself off after build completion? Thanks in advance 回答1: https://docs.bazel.build/versions/master/remote-caching.html

Bazel remote cache analysis data

倖福魔咒の 提交于 2020-12-06 08:23:41
问题 I am running bazel (via bazelisk) inside a docker container on jenkins. Furthermore I use a remote cache. On subsequent runs with no changes I get 100% cache hits, but the analysis phase (~60seconds) runs everytime a new container is created. Is there a way to cache the analysis data remotely aswell or am I forced to run bazel directly on the jenkins agent so it doesn't shut itself off after build completion? Thanks in advance 回答1: https://docs.bazel.build/versions/master/remote-caching.html

Bazel build verbose compiler commands logging

。_饼干妹妹 提交于 2020-12-02 00:13:37
问题 How can I increase the verbosity of the build process? Bazel seems to print compiler commands only if something goes wrong during the build. I would like to see which compiler comands the cc_library rule fires, even if everything seems to be fine, to debug linking problems. I already tried various bazel command line parameters but nothing gives me the compiler commands :( 回答1: This is probably what you are looking for bazel build -s //my:target The -s switch makes Bazel print out all the

Bazel build verbose compiler commands logging

蹲街弑〆低调 提交于 2020-12-02 00:10:31
问题 How can I increase the verbosity of the build process? Bazel seems to print compiler commands only if something goes wrong during the build. I would like to see which compiler comands the cc_library rule fires, even if everything seems to be fine, to debug linking problems. I already tried various bazel command line parameters but nothing gives me the compiler commands :( 回答1: This is probably what you are looking for bazel build -s //my:target The -s switch makes Bazel print out all the

Bazel build verbose compiler commands logging

霸气de小男生 提交于 2020-12-02 00:09:48
问题 How can I increase the verbosity of the build process? Bazel seems to print compiler commands only if something goes wrong during the build. I would like to see which compiler comands the cc_library rule fires, even if everything seems to be fine, to debug linking problems. I already tried various bazel command line parameters but nothing gives me the compiler commands :( 回答1: This is probably what you are looking for bazel build -s //my:target The -s switch makes Bazel print out all the