Hi Chris, On Tue, 03 Oct 2017 09:32:39 +0100 Chris Lamb <la...@debian.org> wrote: > Hi Emmanuel, > > > I eventually found this check performed in the load() method of RT.java: > > > > if((classURL != null && > > (cljURL == null > > || lastModified(classURL, classfile) > lastModified(cljURL, > > scriptfile))) > > > > Changing '>' with '>=' fixes the issue. > > Great stuff! So, we have two options as I see it: > > a) We patch clojure with ">=" (and send it upstream, etc. etc.) > > b) We make strip-nondetermism subtract 1 second from the .clj files' > target modification times so it matches with the existing ">". > > My preference is for "a)", naturally...
I'm afraid a) is not the correct solution here. If you want to make sure that the bytecode is strictly newer than the source, you *have* to re-compile if they have the same mtime. This is especially true when taking into account that the mtime resolution is finite (and pretty coarse indeed in cases like ext3). Setting the mtime of .clj files one second earlier than .class should Do The Right Thing™. Cheers, Apollon