weixin_39963465
weixin_39963465
2020-11-27 20:22

Bazel failed to exclude nilness and unsafe pointer for dependencies (Mac only)

Bazel build on beacon chain master is currently broken with the following error:


compilepkg: nogo: errors found by nogo during build-time code analysis:
/var/folders/l6/t4tq5tcx7fg0ddglrbgk5hxm0000gn/T/rules_go_work-492090240/_cgo_gotypes.go:425:8: tautological condition: nil == nil
/var/folders/l6/t4tq5tcx7fg0ddglrbgk5hxm0000gn/T/rules_go_work-492090240/watcher_fsevents_cgo.go:99:30: possible misuse of unsafe.Pointer
/var/folders/l6/t4tq5tcx7fg0ddglrbgk5hxm0000gn/T/rules_go_work-492090240/watcher_fsevents_cgo.go:104:35: possible misuse of unsafe.Pointer
/var/folders/l6/t4tq5tcx7fg0ddglrbgk5hxm0000gn/T/rules_go_work-492090240/watcher_fsevents_cgo.go:106:23: possible misuse of unsafe.Pointer

Meaning the dependencies have bad code and it fails our analysis, however nilness and unsafe pointer are already ignored in nogo_config.json

该提问来源于开源项目:prysmaticlabs/prysm

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39963465 weixin_39963465 5月前

    Work around:

    Edit the following line to have no parameters https://github.com/prysmaticlabs/prysm/blob/master/WORKSPACE#L111 go_register_toolchains()

    点赞 评论 复制链接分享
  • weixin_39946266 weixin_39946266 5月前

    Something off about the error message is that it's not under external/* so that could be a cause for the failure.

    Can you try with this commit? https://github.com/prysmaticlabs/prysm/commit/721541672b8054f1a8b4a8978908edbaf192d652

    点赞 评论 复制链接分享
  • weixin_39946266 weixin_39946266 5月前

    Actually, looking at this PR https://github.com/bazelbuild/rules_go/pull/2087, its supposed to be a regex, not a glob.

    Please try this commit: https://github.com/prysmaticlabs/prysm/commit/ee491322ce1a430c73e90d24358d8a0a55486e85

    点赞 评论 复制链接分享
  • weixin_39946266 weixin_39946266 5月前

    If that fails, we'll just disable these checks for now.

    点赞 评论 复制链接分享
  • weixin_39963465 weixin_39963465 5月前

    both https://github.com/prysmaticlabs/prysm/commit/721541672b8054f1a8b4a8978908edbaf192d652 and https://github.com/prysmaticlabs/prysm/commit/ee491322ce1a430c73e90d24358d8a0a55486e85 did not work

    点赞 评论 复制链接分享

相关推荐