cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dnolen 2021-06-01T17:14:56.118800Z

@lee https://clojure.atlassian.net/browse/CLJS-3312 let know if this doesn't look right description wise

lread 2021-06-01T17:52:32.120Z

Hmm… not sure. Metagetta is also doing other stuff. I’ll try to minimally reproduce.

lread 2021-06-01T22:31:35.125100Z

Ok @dnolen here’s my repro from cljdoc-analyzer usage. Given deps.edn:

{:paths ["src"]
 :deps {org.clojure/clojure {:mvn/version "1.10.3"}}
 :aliases {:v844 {:replace-deps {org.clojure/clojurescript {:mvn/version "1.10.844"}}}
           :v866 {:replace-deps {org.clojure/clojurescript {:mvn/version "1.10.866"}}}}}
src/repro/main.clj:
(ns repro.main
  (:require [cljs.analyzer.api :as ana]))

(defn -main []
  (println "\n-will pass->")
  (println (ana/parse-ns "./src/repro/will_parse.cljc"))

  (println "\n-will pass on 844 but throw on 866->")
  (println (ana/parse-ns "./src/repro/will_fail.cljc")))
src/repro/will_fail.clj:
(ns repro.will-fail)

(def some-data #uknown-tagged-literal {})
src/repro/will_parse.clj
(ns foo.will-parse)

;; adding this def allows us to parse
(def x 1)

(def some-data #unknown-tagged-literal {})
Running under 1.10.844 passes:
❯ clj -M:v844 -m repro.main

-will pass->
{:ns foo.will-parse, :provides [foo.will-parse], :requires #{cljs.core}, :file nil, :source-file ./src/repro/will_parse.cljc, :source-forms nil, :ast {:rename-macros nil, :renames {}, :use-macros nil, :excludes #{}, :name foo.will-parse, :op :ns, :env {:ns {:name cljs.user}, :context :statement, :locals {}, :fn-scope [], :js-globals {console {:op :js-var, :name console, :ns js}, location {:op :js-var, :name location, :ns js}, escape {:op :js-var, :name escape, :ns js}, screen {:op :js-var, :name screen, :ns js}, global {:op :js-var, :name global, :ns js}, process {:op :js-var, :name process, :ns js}, require {:op :js-var, :name require, :ns js}, alert {:op :js-var, :name alert, :ns js}, history {:op :js-var, :name history, :ns js}, window {:op :js-var, :name window, :ns js}, module {:op :js-var, :name module, :ns js}, exports {:op :js-var, :name exports, :ns js}, document {:op :js-var, :name document, :ns js}, navigator {:op :js-var, :name navigator, :ns js}, unescape {:op :js-var, :name unescape, :ns js}}, :line 1, :column 1}, :cljs.analyzer/analyzed true, :imports nil, :requires nil, :uses nil, :reload {:use nil, :require nil, :use-macros nil, :require-macros nil}, :require-macros nil, :form (ns foo.will-parse), :reloads {}, :doc nil, :deps []}, :macros-ns false}

-will pass on 844 but throw on 866->
{:ns repro.will-fail, :provides [repro.will-fail], :requires #{cljs.core}, :file nil, :source-file ./src/repro/will_fail.cljc, :source-forms nil, :ast {:rename-macros nil, :renames {}, :use-macros nil, :excludes #{}, :name repro.will-fail, :op :ns, :env {:ns {:name cljs.user}, :context :statement, :locals {}, :fn-scope [], :js-globals {console {:op :js-var, :name console, :ns js}, location {:op :js-var, :name location, :ns js}, escape {:op :js-var, :name escape, :ns js}, screen {:op :js-var, :name screen, :ns js}, global {:op :js-var, :name global, :ns js}, process {:op :js-var, :name process, :ns js}, require {:op :js-var, :name require, :ns js}, alert {:op :js-var, :name alert, :ns js}, history {:op :js-var, :name history, :ns js}, window {:op :js-var, :name window, :ns js}, module {:op :js-var, :name module, :ns js}, exports {:op :js-var, :name exports, :ns js}, document {:op :js-var, :name document, :ns js}, navigator {:op :js-var, :name navigator, :ns js}, unescape {:op :js-var, :name unescape, :ns js}}, :line 1, :column 1}, :cljs.analyzer/analyzed true, :imports nil, :requires nil, :uses nil, :reload {:use nil, :require nil, :use-macros nil, :require-macros nil}, :require-macros nil, :form (ns repro.will-fail), :reloads {}, :doc nil, :deps []}, :macros-ns false}
And under 1.10.866 throws for will_fail.cljc:
❯ clj -M:v866 -m repro.main

-will pass->
{:ns foo.will-parse, :provides [foo.will-parse], :requires #{cljs.core}, :file nil, :source-file ./src/repro/will_parse.cljc, :source-forms nil, :ast {:rename-macros nil, :renames {}, :use-macros nil, :excludes #{}, :name foo.will-parse, :op :ns, :env {:ns {:name cljs.user}, :context :statement, :locals {}, :fn-scope [], :js-globals {console {:op :js-var, :name console, :ns js}, location {:op :js-var, :name location, :ns js}, escape {:op :js-var, :name escape, :ns js}, screen {:op :js-var, :name screen, :ns js}, global {:op :js-var, :name global, :ns js}, process {:op :js-var, :name process, :ns js}, require {:op :js-var, :name require, :ns js}, alert {:op :js-var, :name alert, :ns js}, history {:op :js-var, :name history, :ns js}, window {:op :js-var, :name window, :ns js}, module {:op :js-var, :name module, :ns js}, exports {:op :js-var, :name exports, :ns js}, document {:op :js-var, :name document, :ns js}, navigator {:op :js-var, :name navigator, :ns js}, unescape {:op :js-var, :name unescape, :ns js}}, :line 1, :column 1}, :cljs.analyzer/analyzed true, :imports nil, :requires nil, :uses nil, :reload {:use nil, :require nil, :use-macros nil, :require-macros nil}, :require-macros nil, :form (ns foo.will-parse), :reloads {}, :doc nil, :deps []}, :macros-ns false}

-will pass on 844 but throw on 866->
Execution error (ExceptionInfo) at clojure.tools.reader.impl.errors/throw-ex (errors.clj:34).
./src/repro/will_fail.cljc [line 3, col 38] No reader function for tag uknown-tagged-literal.

Full report at:
/var/folders/zh/ctcr2q_95ksf3w9f5kgv_g_m0000gn/T/clojure-5633562870656220603.edn
I don’t know if this adds any new understanding, but if so am happy to update CLJS-3311 or CLJS-3312.