Skip to content

Dependencies addition of soyutils_usegoog.js makes hard to compile soy files #1642

@itchyny

Description

@itchyny

We're facing compile errors on upgrading Closure Templates to 2023-09-13. We include soyutils_usegoog.js to our code base to compile our soy files. However, recent changes of this file adds external dependencies jspb and safevalues, and we cannot compile our soy files anymore. How can we resolve the modules?

src/js/soyutils/soyutils_usegoog.js:46:264 ERROR - [JSC_MISSING_MODULE_OR_PROVIDE] Required namespace "safevalues" never defined.
const {SafeHtml: TsSafeHtml, SafeScript: TsSafeScript, SafeStyle: TsSafeStyle, SafeStyleSheet: TsSafeStyleSheet, SafeUrl: TsSafeUrl, TrustedResourceUrl: TsTrustedResourceUrl, unwrapHtml, unwrapResourceUrl, unwrapScript, unwrapStyle, unwrapStyleSheet, unwrapUrl} = goog.require('safevalues');
                                                                                                                                                                                                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^

src/js/soyutils/soyutils_usegoog.js:48:35 ERROR - [JSC_MISSING_MODULE_OR_PROVIDE] Required namespace "jspb.immutable_message" never defined.
const {defaultImmutableInstance} = goog.require('jspb.immutable_message');
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/js/soyutils/soyutils_usegoog.js:49:27 ERROR - [JSC_MISSING_MODULE_OR_PROVIDE] Required namespace "safevalues.restricted.reviewed" never defined.
const {htmlSafeByReview} = goog.require('safevalues.restricted.reviewed');
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions