We're updating the issue view to help you get more done. 

Namespace never provided error

Description

src/foo/core.cljs

1 2 (ns foo.core (:require cognitect.transit))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 $ 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

Environment

{:deps {org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript"
:sha "ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7"}
com.cognitect/transit-cljs {:mvn/version "0.8.256"}}}

Status

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Affects versions

1.10.238

Priority

Major