google / upvote_py2

A multi-platform binary whitelisting solution
Apache License 2.0
452 stars 35 forks source link

build issue with latest PR #23

Closed thehesiod closed 5 years ago

thehesiod commented 5 years ago
ERROR: /Users/amohr/dev/upvote/upvote/gae/modules/upvote_app/frontend/BUILD:20:1: Checking 116 JS files in //upvote/gae/modules/upvote_app/frontend:closure_lib failed (Exit 1)
upvote/gae/modules/upvote_app/frontend/web_ui/detailpage/detail-controller.js:43: WARNING - Please do not use goog.scope to hide declarations.
It is preferable to either create an @private namespaced declaration, or migrate to goog.module.
let ComponentRegistry;
    ^
  ProTip: "JSC_GOOG_SCOPE_HIDDEN_TYPE" can be added to the `suppress` attribute of:
  //upvote/gae/modules/upvote_app/frontend:closure_lib

upvote/gae/modules/upvote_app/frontend/admin_ui/blockablepage/blockablepage-controller.js:17: ERROR - Namespace not provided by any srcs or direct deps of //upvote/gae/modules/upvote_app/frontend:closure_lib.
goog.require('goog.dom.safe');
             ^
  ProTip: "CR_NOT_PROVIDED" or "strictDependencies" can be added to the `suppress` attribute of:
  //upvote/gae/modules/upvote_app/frontend:closure_lib

1 error(s), 1 warning(s)

guessing the closure lib version needs to be updated?

chief8192 commented 5 years ago

Ok I've filed an internal bug. Not sure how this slipped through the release process...

thehesiod commented 5 years ago

I've been trying to fix it, I figured out how to update it but for some reason it still cant find the definition

chief8192 commented 5 years ago

Try adding the following line to the 'deps' section of the 'closure_lib' build rule in /upvote/gae/modules/upvote_app/frontend/BUILD:

"@io_bazel_rules_closure//closure/library/dom/safe",

thehesiod commented 5 years ago

ya I tried that but then got:

ERROR: /Users/amohr/dev/upvote/upvote/gae/modules/upvote_app/frontend/BUILD:20:1: no such package '@io_bazel_rules_closure//closure/library/dom/safe': BUILD file not found on package path and referenced by '//upvote/gae/modules/upvote_app/frontend:closure_lib'
ERROR: Analysis of target '//upvote/gae:monolith_binary.deploy' failed; build aborted: no such package '@io_bazel_rules_closure//closure/library/dom/safe': BUILD file not found on package path

This is how I upgraded closure:

http_archive(
    name = "io_bazel_rules_closure",
    sha256 = "b29a8bc2cb10513c864cb1084d6f38613ef14a143797cea0af0f91cd385f5e8c",
    strip_prefix = "rules_closure-0.8.0",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/0.8.0.tar.gz",
        "https://github.com/bazelbuild/rules_closure/archive/0.8.0.tar.gz",
    ],
)
chief8192 commented 5 years ago

And that fixed it?

thehesiod commented 5 years ago

nope, that just gave me a closure that had the goog.dom.safe "module"....I get that error above if I try adding the line you mention to frontend/BUILD, which I also though would resolve the second issue. I'm at a loss. I'll try after reverting my closure change

chief8192 commented 5 years ago

It might need to be: "@io_bazel_rules_closure//closure/library/dom:safe", (note the colon)

thehesiod commented 5 years ago

indeed, that was the only fix required: https://github.com/farmersbusinessnetwork/upvote/commit/46e5ac1e84b7aa64c90d72c672aee00fd78b80e5 thanks!

chief8192 commented 5 years ago

Fixed in https://github.com/google/upvote/commit/4e20a4dcc10a8632b4ea9e7cf7ca518f55d4dc6a