Skip to content
Leon Mergen edited this page Jul 26, 2016 · 7 revisions

With Boot version 2.6.0-SNAPSHOT, windows 10 is now fully. Even headless JS unit testing with phantomjs is now supported with crisptrutski/boot-cljs-test version 0.2.2-SNAPSHOT.

First, I've been told that windows 10 fixes a lot of issues over previous releases. Of course, you still can't delete open files nor can you delete read-only files. And the file separator difference still crops up from time to time. But these are now handled. A number of changes have been made to support windows 10, the latest being Boot version 2.6.0-SNAPSHOT.

Another concern is Java. Java 1.8 apparently works best.

The easy way to switch to this latest version of boot is simply to update your boot.properties file to this:

BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.6.0-SNAPSHOT

You will also need to add a parameter to serve in your dev task defined in build.boot, like so:

(serve :port 8000 :init-params {"org.eclipse.jetty.servlet.Default.useFileMappedBuffer" "false"})

Now there is one additional requirement when writing cljs or cljc code for web workers. Do not use compiler optimization none (the default). But I believe everything else works. So again in the dev task of your build.boot file, you will want to add an optimization parameter like this:

(cljs :optimizations :simple)

Of course, you may need to update your dependencies as well. Use this command to find out what needs to be updated:

boot show -u

And that should take care of it.

Many thanks to the boot dev team for seeing this through. Not easy, as they are all nx geeks. :-)

Production builds

If you want to build uberjars for your production environment, the current version of boot requires you to patch uber's exclude pattern to support windows paths. Define a build task, for example like this:

(deftask build
  "This is used for creating an optimized uberjar "
  []
  (comp
   (aot :all true)
   (uber :exclude #{#"(?i)^META-INF/[^/]*\.(MF|SF|RSA|DSA)$"
                    #"(?i)^META-INF\\[^/]*\.(MF|SF|RSA|DSA)$"
                    #"(?i)^META-INF/INDEX.LIST$"
                    #"(?i)^META-INF\\INDEX.LIST$"})
   (jar :main 'my.module.core)
   (target)))
Clone this wiki locally