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

Mike Fikes made changes -
Field Original Value New Value
Description Reverting this commit seems to fix the issue:
[https://github.com/clojure/clojurescript/commit/ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7]

{code:title=Log|borderStyle=solid}
SEVERE: /Users/galidolber/github/nebleena/system/target/api/cognitect/transit.js:5: ERROR - required "com$.cognitect.transit" namespace never provided
goog.require('com$.cognitect.transit');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 16, 2018 3:31:11 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/galidolber/github/nebleena/system/target/api/cognitect/transit.js:6: ERROR - required "com$.cognitect.transit.types" namespace never provided
goog.require('com$.cognitect.transit.types');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 16, 2018 3:31:11 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/galidolber/github/nebleena/system/target/api/cognitect/transit.js:7: ERROR - required "com$.cognitect.transit.eq" namespace never provided
goog.require('com$.cognitect.transit.eq');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{code}
Reverting this commit seems to fix the issue:
[https://github.com/clojure/clojurescript/commit/ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7]

{code:title=src/foo/core.cljs}
(ns foo.core
 (:require cognitect.transit))
{code}

{noformat}
$ 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');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
{noformat}

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

The root cause is that, even though the attempt is to convert {{com}} to {{com$}} universally (indeed fixing up the {{goog.provide}} statements emitted for ClojureScript namespaces that start with {{com}}), it doesn't fix up non-compiled {{goog.provide}} statements that are explicit: https://github.com/cognitect/transit-js/blob/b3cf3d60da339b73d269f14713cced33332d43a7/src/com/cognitect/transit.js#L17
Environment {:git/url "https://github.com/clojure/clojurescript"
 :sha "343e6aef57b802975fca3fb5fa0fd85a20330d66"}
{:deps {org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript"
                                   :sha "ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7"}
        com.cognitect/transit-cljs {:mvn/version "0.8.256"}}}
Labels regression
Mike Fikes made changes -
Description Reverting this commit seems to fix the issue:
[https://github.com/clojure/clojurescript/commit/ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7]

{code:title=src/foo/core.cljs}
(ns foo.core
 (:require cognitect.transit))
{code}

{noformat}
$ 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');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
{noformat}

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

The root cause is that, even though the attempt is to convert {{com}} to {{com$}} universally (indeed fixing up the {{goog.provide}} statements emitted for ClojureScript namespaces that start with {{com}}), it doesn't fix up non-compiled {{goog.provide}} statements that are explicit: https://github.com/cognitect/transit-js/blob/b3cf3d60da339b73d269f14713cced33332d43a7/src/com/cognitect/transit.js#L17
{code:title=src/foo/core.cljs}
(ns foo.core
 (:require cognitect.transit))
{code}

{noformat}
$ 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');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
{noformat}

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

The root cause is that, even though the attempt is to convert {{com}} to {{com$}} universally (indeed fixing up the {{goog.provide}} statements emitted for ClojureScript namespaces that start with {{com}}), it doesn't fix up non-compiled {{goog.provide}} statements that are explicit: https://github.com/cognitect/transit-js/blob/b3cf3d60da339b73d269f14713cced33332d43a7/src/com/cognitect/transit.js#L17
Mike Fikes made changes -
Description {code:title=src/foo/core.cljs}
(ns foo.core
 (:require cognitect.transit))
{code}

{noformat}
$ 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');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
{noformat}

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

The root cause is that, even though the attempt is to convert {{com}} to {{com$}} universally (indeed fixing up the {{goog.provide}} statements emitted for ClojureScript namespaces that start with {{com}}), it doesn't fix up non-compiled {{goog.provide}} statements that are explicit: https://github.com/cognitect/transit-js/blob/b3cf3d60da339b73d269f14713cced33332d43a7/src/com/cognitect/transit.js#L17
{code:title=src/foo/core.cljs}
(ns foo.core
 (:require cognitect.transit))
{code}

{noformat}
$ 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');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
{noformat}

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
Hide
David Nolen added a comment -

Hrm yeah, I'm OK on giving up on Rhino for this particular issue for now. We should reopen and lower the priority on CLJS-2770.

Show
David Nolen added a comment - Hrm yeah, I'm OK on giving up on Rhino for this particular issue for now. We should reopen and lower the priority on CLJS-2770.
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: