Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Some UI widgest can't be used under Bazel due to files under //closure/goog/css being un-referenceable. #1185

Closed
bcsgh opened this issue Mar 15, 2023 · 4 comments

Comments

@bcsgh
Copy link

bcsgh commented Mar 15, 2023

The current BUILD files contain only //closure/goog:base, closure_base_js_library() rules and alias()s for the others.

Some of the closure_base_js_library() rules require [edit: seem to expect] that the HTML incorporate some CSS from under //closure/goog/css, but that can't be done from Bazel due to closure/goog/css/BUILD being:

package(default_visibility = ["//visibility:public"])

Any attempt to reference the CSS files (e.g. via a closure_css_library() rule) gets a message to the effect of:

ERROR: .../BUILD:7:20: no such target '@com_google_javascript_closure_library//closure/goog/css:autocomplete.css': 
target 'autocomplete.css' not declared in package 'closure/goog/css' defined by
.../external/com_google_javascript_closure_library/closure/goog/css/BUILD; however, a source file of this name exists.  
(Perhaps add 'exports_files(["autocomplete.css"])' to closure/goog/css/BUILD?) and referenced by '...:css'

At a minimum, it would be useful to include something like:

exports_files(glob(["*.css"]))

Even better would be to include actual relevant rules. (In this case closure_css_library() rules.)


The full list of BUILD files for which there seems to be no useful rules (and thus implies there is content that that is expected to be used, but that can't be) is:

  • closure/goog/css/BUILD
  • closure/goog/css/editor/BUILD
  • closure/goog/dom/testdata/BUILD
  • closure/goog/images/BUILD
  • closure/goog/images/tree/BUILD
  • closure/goog/labs/BUILD
@shicks
Copy link
Member

shicks commented Mar 16, 2023

goog.ui isn't being maintained anymore. Maybe you can pull something working out of an older commit? But in general, your best bet would be to avoid using goog.ui at all.

@bcsgh
Copy link
Author

bcsgh commented Mar 16, 2023

Is there a recommended replacement for that widget set?

Should that directory be marked some how as depreciated or unsupported?

@shicks
Copy link
Member

shicks commented Mar 23, 2023

Pretty much anything would be better than goog.ui - Angular, React, MDC, vanilla JS, etc.

@bcsgh
Copy link
Author

bcsgh commented Mar 23, 2023

Do the maintainer of any of those provide official 1st class support for the closure compiler under Bazel? A first pass search of each seems to suggest not. (That's the major check-box feature for me.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants