bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

:global-exports breaks compilation #602

Closed vspinu closed 7 years ago

vspinu commented 7 years ago

1.9.854 introduced new :global-exports options but it breaks with figwheel. lein cljsbuild works fine:

user> ExceptionInfo ------ Figwheel Configuration Error ------

Found unrecognized key :global-exports at path (:cljsbuild :builds :dev :compiler :foreign-libs 3)
Must be one of: :file, :module-type, :requires, :preprocess, :provides or :file-min

/store/Dropbox/dev/commix-graph/project.clj:72:27
  67                            :requires ["js.lodash"]}
  68                           {:file           "js/joint.js"
  69                            :file-min       "js/joint.min.js"
  70                            :provides       ["js.joint"]
  71                            :requires       ["js.jquery" "js.backbone" "js.lodash"]
  72                            :global-exports {js.joint/joint        joint
                                ^---  The key :global-exports is unrecognized
  73                                             js.joint/Vectoriser   Vectorizer
  74                                             js.joint/geometry     geometry
  75                                             js.joint/version      joint.version
  76                                             js.joint/dia          joint.dia
  77                                             js.joint/ui           joint.ui

------------------------------------------
  clojure.core/ex-info (core.clj:4725)

Why would figwheel check for compilation options?

bhauman commented 7 years ago

Config validation is a service that Figwheel provides that generally saves people a bunch of time and frustration.

Pro users can turn config validation off with the :validate-config option.

vspinu commented 7 years ago

Thanks for a super quick fix!!

Pro users can turn config validation off with the :validate-config option.

Good I haven't discovered this. Laziness would have kicked in and I might not have reported this in the first place :)