-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Externs inner namespaces fix #4069
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Maybe add tests for this? We've personally run into this especially when trying to patch closure's own externs from a downstream project - there are lots of cases where merging not only namespaces, but also fully unioning externs, which we've had trouble with (but maybe it has gotten better). Finally, in lieu of a comments section in the blog, bazel itself advertises a plugin for IntelliJ, which is not terrible, though does have some pretty substantial warts (for example, it effectively never works with a recent IJ build, and you sometimes need to exclude some targets from being indexed). Once installed and configured, as long as you're comfortable with the bazel command line, it is pretty decent though. |
Thanks doing all this investigation. I'll take a more thorough look after the weekend, but a few early comments:
|
Ok, I definitely believe the right fix is to unify the behavior of Are you interested in making that change in this PR? Sounds great if you are, otherwise please hand this off via filing an issue. |
Inner namespace consolidation.
📝 The write up: The Bitter Taste Of Bazel In My Morning Java, Or How I Consolidated Google Namespaces .
I understand you might not go with the
isFromEmptyObjLitExtern
as in the PR and choose to properly fixif (isObjectLiteralThatCanBeSkipped(type))
instead, i.e., by maintainingdroppedPropertiesOfUnions
correctly. It's all in the blog post.Please leave a comment to acknowledge the presence of the bug due the making of the recursive function call come first 4f69363 which results in types being substituted to the sentinel one without recording their dropped properties.