ClojureScript

Tests fail if directory has a period (.) in the path

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:
    None
  • Patch:
    Code

Description

Check out compiler into a cljs.dev directory and run lein test :only cljs.module-processing-tests.

Seems very similar to CLJS-2914.

$ lein test :only cljs.module-processing-tests

lein test cljs.module-processing-tests

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:124)
expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}])))))
  actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator');\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:129)
expected: (= output (compile (quote (calc/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:130)
expected: (= output (compile (quote (calculator/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:131)
expected: (= output (compile (quote (add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:132)
expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))

lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol

FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/es6-module-processing

FAIL in (es6-module-processing) (module_processing_tests.clj:97)
Processed modules are added to :js-module-index
expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"es6-hello" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))

lein test :only cljs.module-processing-tests/test-cljs-1822

FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/commonjs-module-processing

FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

Ran 5 tests containing 14 assertions.
9 failures, 0 errors.
Tests failed.

Activity

Ray McDermott made changes -
Field Original Value New Value
Description

$ lein test :only cljs.module-processing-tests

lein test cljs.module-processing-tests

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:124)
expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}])))))
  actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator');\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:129)
expected: (= output (compile (quote (calc/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:130)
expected: (= output (compile (quote (calculator/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:131)
expected: (= output (compile (quote (add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:132)
expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))

lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol

FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/es6-module-processing

FAIL in (es6-module-processing) (module_processing_tests.clj:97)
Processed modules are added to :js-module-index
expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"es6-hello" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))

lein test :only cljs.module-processing-tests/test-cljs-1822

FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/commonjs-module-processing

FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

Ran 5 tests containing 14 assertions.
9 failures, 0 errors.
Tests failed.
Check out compiler into a {{foo.bar}} directory and run {{lein test :only cljs.module-processing-tests}}.

Seems very similar to CLJS-2914.

{noformat}
$ lein test :only cljs.module-processing-tests

lein test cljs.module-processing-tests

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:124)
expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}])))))
  actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator');\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:129)
expected: (= output (compile (quote (calc/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:130)
expected: (= output (compile (quote (calculator/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:131)
expected: (= output (compile (quote (add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:132)
expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))

lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol

FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/es6-module-processing

FAIL in (es6-module-processing) (module_processing_tests.clj:97)
Processed modules are added to :js-module-index
expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"es6-hello" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))

lein test :only cljs.module-processing-tests/test-cljs-1822

FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/commonjs-module-processing

FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

Ran 5 tests containing 14 assertions.
9 failures, 0 errors.
Tests failed.
{noformat}
Hide
Ray McDermott added a comment -

It's looking for cljs_dev

Show
Ray McDermott added a comment - It's looking for cljs_dev
Ray McDermott made changes -
Description Check out compiler into a {{foo.bar}} directory and run {{lein test :only cljs.module-processing-tests}}.

Seems very similar to CLJS-2914.

{noformat}
$ lein test :only cljs.module-processing-tests

lein test cljs.module-processing-tests

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:124)
expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}])))))
  actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator');\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:129)
expected: (= output (compile (quote (calc/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:130)
expected: (= output (compile (quote (calculator/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:131)
expected: (= output (compile (quote (add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:132)
expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))

lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol

FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/es6-module-processing

FAIL in (es6-module-processing) (module_processing_tests.clj:97)
Processed modules are added to :js-module-index
expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"es6-hello" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))

lein test :only cljs.module-processing-tests/test-cljs-1822

FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/commonjs-module-processing

FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

Ran 5 tests containing 14 assertions.
9 failures, 0 errors.
Tests failed.
{noformat}
Check out compiler into a {{cljs.dev}} directory and run {{lein test :only cljs.module-processing-tests}}.

Seems very similar to CLJS-2914.

{noformat}
$ lein test :only cljs.module-processing-tests

lein test cljs.module-processing-tests

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:124)
expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}])))))
  actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator');\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:129)
expected: (= output (compile (quote (calc/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:130)
expected: (= output (compile (quote (calculator/add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:131)
expected: (= output (compile (quote (add 3 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n"))

lein test :only cljs.module-processing-tests/test-module-name-substitution

FAIL in (test-module-name-substitution) (module_processing_tests.clj:132)
expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4))))
  actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))

lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol

FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/es6-module-processing

FAIL in (es6-module-processing) (module_processing_tests.clj:97)
Processed modules are added to :js-module-index
expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"es6-hello" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))

lein test :only cljs.module-processing-tests/test-cljs-1822

FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/commonjs-module-processing

FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

Ran 5 tests containing 14 assertions.
9 failures, 0 errors.
Tests failed.
{noformat}
Ray McDermott made changes -
Assignee Ray McDermott [ ray.mcdermott ]
Hide
Ray McDermott added a comment -

Building on the code fix for CLJS-2782 we can replace the periods with hyphens and then leverage the cond-> to selectively transform to underscores.

Show
Ray McDermott added a comment - Building on the code fix for CLJS-2782 we can replace the periods with hyphens and then leverage the cond-> to selectively transform to underscores.
Ray McDermott made changes -
Status Open [ 1 ] In Progress [ 3 ]
Ray McDermott made changes -
Attachment CLJS-2915.patch [ 18514 ]
Ray McDermott made changes -
Status In Progress [ 3 ] Open [ 1 ]
Hide
Ray McDermott added a comment -

Patch attached

Show
Ray McDermott added a comment - Patch attached
Ray McDermott made changes -
Patch Code [ 10001 ]
Hide
Mike Fikes added a comment -

Hey Ray, this patch doesn't apply on master. Is the intent that this patch depend on the patch in CLJS-2782 being applied first? (Usually patches are independent, but in some cases a patch can depend on changes in another ticket if it needs to.)

Show
Mike Fikes added a comment - Hey Ray, this patch doesn't apply on master. Is the intent that this patch depend on the patch in CLJS-2782 being applied first? (Usually patches are independent, but in some cases a patch can depend on changes in another ticket if it needs to.)
Hide
Ray McDermott added a comment -

Hi Mike - yes the patch for CLJS-2782 needs to be applied first. If it was done the other way around, that patch would revert this one.

Another option would be to close the other bug with a new patch here that squashes both bugs.

I was concerned about trying to close two bugs with one patch but yes the ordering / dependency is not good either.

How would you prefer to handle it?

Show
Ray McDermott added a comment - Hi Mike - yes the patch for CLJS-2782 needs to be applied first. If it was done the other way around, that patch would revert this one. Another option would be to close the other bug with a new patch here that squashes both bugs. I was concerned about trying to close two bugs with one patch but yes the ordering / dependency is not good either. How would you prefer to handle it?
Hide
Mike Fikes added a comment -

Since one patch revises a line and another patch adds a new line, you could normally make independent patches where either could be applied first. But, the problem with this pair of tickets, though, is that the changes are sufficiently close together that whichever patch is applied second will need to be re-baselined. (I don't know what the threshold is, but anywhere within a few lines will do it.) To avoid that, we might as well have this patch depend on the one in CLJS-2782 being applied first.

Show
Mike Fikes added a comment - Since one patch revises a line and another patch adds a new line, you could normally make independent patches where either could be applied first. But, the problem with this pair of tickets, though, is that the changes are sufficiently close together that whichever patch is applied second will need to be re-baselined. (I don't know what the threshold is, but anywhere within a few lines will do it.) To avoid that, we might as well have this patch depend on the one in CLJS-2782 being applied first.
Mike Fikes made changes -
Assignee Ray McDermott [ ray.mcdermott ] Mike Fikes [ mfikes ]
Mike Fikes made changes -
Status Open [ 1 ] In Progress [ 3 ]
Hide
Mike Fikes added a comment -

CLJS-2915.patch LGTM. Note that it is designed to be applied after the patch in CLJS-2782.

Tested locally with a checkout in a directory with both dots and hyphens. Also passes in CI.

Show
Mike Fikes added a comment - CLJS-2915.patch LGTM. Note that it is designed to be applied after the patch in CLJS-2782. Tested locally with a checkout in a directory with both dots and hyphens. Also passes in CI.
Mike Fikes made changes -
Assignee Mike Fikes [ mfikes ] David Nolen [ dnolen ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: