Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closure_js_template_library.should_provide_require_soy_namespaces does nothing #381

Closed
robfig opened this issue Jun 1, 2019 · 2 comments · Fixed by #386
Closed

closure_js_template_library.should_provide_require_soy_namespaces does nothing #381

robfig opened this issue Jun 1, 2019 · 2 comments · Fixed by #386

Comments

@robfig
Copy link
Contributor

robfig commented Jun 1, 2019

I'm using closure_js_template_library with an application that uses closure modules, so I need the generated code to use goog.provide / goog.require. The documentation says that should_provide_require_soy_namespaces is passed through to the compiler, but in fact it does nothing because SoyToJsSrcCompiler had that flag removed at some point.

That sounds ok, except I'm overriding it with a version of Soy that is a year or two old, and I can't update without fixing the various backwards incompatibilities that were introduced since then. The compiler I'm using still has that flag, and it defaults to false, so it's not possible for me to proceed without making some sort of change.

I wanted to ask if you would be open to a generic args parameter that acts as a passthrough to the compiler? This would solve this case as well as possible future cases when the flags change. There are also a good number of flags, so it's not infeasible to think that there are other valid use cases for wanting to get at them.

Either way, I think it's worth updating the documentation on this parameter or possibly removing it entirely. I can do that if you give me a green light to make the pull request described above.

Thanks

https://github.com/bazelbuild/rules_closure#closure_js_template_library

@gkdn
Copy link
Collaborator

gkdn commented Jun 4, 2019

The documentation should be removed.
w.r.t passthrough; we can accept something in the lines of defs attribute for closure_js_binary rule.

robfig pushed a commit to robfig/rules_closure that referenced this issue Jun 4, 2019
…ToJsSrcCompiler

This also removes the vestigial `should_provide_require_soy_namespaces`

Fixes bazelbuild#381
@robfig
Copy link
Contributor Author

robfig commented Jun 4, 2019

I also removed the old should_provide_require_soy_namespaces property to reduce confusion in the future. Let me know if you'd like to leave it with a note instead.

robfig pushed a commit to robfig/rules_closure that referenced this issue Jun 5, 2019
…ToJsSrcCompiler

This also removes the vestigial `should_provide_require_soy_namespaces`

Fixes bazelbuild#381
@gkdn gkdn closed this as completed in #386 Jun 6, 2019
gkdn pushed a commit that referenced this issue Jun 6, 2019
…ToJsSrcCompiler (#386)

This also removes the vestigial `should_provide_require_soy_namespaces`

Fixes #381
ptmphuong pushed a commit to ptmphuong/rules_closure that referenced this issue Dec 9, 2022
…ToJsSrcCompiler (bazelbuild#386)

This also removes the vestigial `should_provide_require_soy_namespaces`

Fixes bazelbuild#381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants