Skip to content
Jacob Kroeze edited this page Apr 20, 2017 · 7 revisions

Starting with Boot version 2.6.0, windows 10 is now fully supported. 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

You will also need to add a parameter to the serve task, 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 whenever you call the cljs task, 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)))

Emacs on Windows 10

Emacs uses actual files to lock a file for a user, so to avoid the watch task running too often, disable emacs lockfiles. Add to you spacemacs/user-config function or emacs config file the following:

(setq create-lockfiles nil) 
Clone this wiki locally