You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLJS-1677: Requiring [goog] breaks an :advanced build, but the compiler exits successfully
This one is a little tricky:
Since goog is added as an implicit dependency at the end of the
compilation pipeline, there is no collision to detect when parsing an
ns form that explicitly requires goog. You could handle this situation
by filtering goog when parsing the ns form, but this leads to a
challenging corner case where goog is required and also aliased: In
that case you want to preserve goog and its alias so that the alias
machinery works properly. But this means that goog will be duplicated
later when add-goog-base is called.
This patch takes the alternative approach of patching things up at the
end: It filters out any existing goog dep before consing it onto the
list of deps, placing a remove-goog-base prior to add-goog-base in the
pipeline.
This fixes the duplicate problem, but oddly results in
JSC_MISSING_PROVIDE_ERROR. required "goog" namespace never provided
if goog.require('goog') is emitted into the JavaScript. This final
aspect is patched up to ensure that this is not emitted.
A unit test is added covering the alias case.
0 commit comments