ClojureScript

Namespace never provided error

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: 1.10.238
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:

Description

src/foo/core.cljs
(ns foo.core
 (:require cognitect.transit))
$ clj -m cljs.main -O advanced -c foo.core
Jun 17, 2018 9:09:56 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/mfikes/Desktop/cljs-2784/out/cognitect/transit.js:5: ERROR - required "com$.cognitect.transit" namespace never provided
goog.require('com$.cognitect.transit');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 17, 2018 9:09:56 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/mfikes/Desktop/cljs-2784/out/cognitect/transit.js:6: ERROR - required "com$.cognitect.transit.types" namespace never provided
goog.require('com$.cognitect.transit.types');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 17, 2018 9:09:56 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/mfikes/Desktop/cljs-2784/out/cognitect/transit.js:7: ERROR - required "com$.cognitect.transit.eq" namespace never provided
goog.require('com$.cognitect.transit.eq');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

Reverting this commit seems to fix the issue:
https://github.com/clojure/clojurescript/commit/ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7

The root cause is that, even though the intent is to munge com to com$ universally (including munging the goog.provide statements emitted for ClojureScript namespaces that start with com), it doesn't munge non-compiled goog.provide statements that are explicitly authored by hand: https://github.com/cognitect/transit-js/blob/b3cf3d60da339b73d269f14713cced33332d43a7/src/com/cognitect/transit.js#L17

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: