Code Monkey home page Code Monkey logo

Comments (3)

timerooney avatar timerooney commented on July 20, 2024

I am running into a similar issue on Windows while trying to update the vis.js package. It also looks like the sift function before the unzipping is completed. That is a possible explanation for why the zip file cannot be deleted, since it is still being accessed at the time that deletion is requested.

> boot package install target
Downloading v4.20.1.zip
Extracting 564 files
java.io.IOException: Couldn't delete C:\Users\trooney\.boot\cache\tmp\Users\trooney\Dev\fixes\cljsjs\packages\vis\bes\f0sqpx\v4.20.1.zip
     clojure.java.io/delete-file/invokeStatic         io.clj:  434
                  clojure.java.io/delete-file         io.clj:  430
                                          ...
                        boot.file/delete-file       file.clj:   55
               boot.tmpdir.TmpFileSet/commit!     tmpdir.clj:  248
                            boot.core/commit!       core.clj:  451
cljsjs.boot-cljsjs.packaging/eval137/fn/fn/fn  packaging.clj:   53
 cljsjs.boot-cljsjs.packaging/eval86/fn/fn/fn  packaging.clj:   25
 cljsjs.boot-cljsjs.packaging/eval249/fn/G/fn  packaging.clj:   86
                          boot.core/run-tasks       core.clj:  938
                            boot.core/boot/fn       core.clj:  948
          clojure.core/binding-conveyor-fn/fn       core.clj: 1938
                                          ...
Sifting output files...
Sifting output files...
clojure.lang.ExceptionInfo: Assert failed: No .inc.js file found!
                            regular
    data: {:file
           "C:\\Users\\trooney\\AppData\\Local\\Temp\\boot.user9067136962680214853.clj",
           :line 19}
  java.lang.AssertionError: Assert failed: No .inc.js file found!
                            regular
cljsjs.boot-cljsjs.packaging/eval296/fn/fn/fn  packaging.clj:  115
               boot.task.built-in/fn/fn/fn/fn   built_in.clj:  493
               boot.task.built-in/fn/fn/fn/fn   built_in.clj:  493
cljsjs.boot-cljsjs.packaging/eval137/fn/fn/fn  packaging.clj:   40
 cljsjs.boot-cljsjs.packaging/eval86/fn/fn/fn  packaging.clj:   25
 cljsjs.boot-cljsjs.packaging/eval249/fn/G/fn  packaging.clj:   86
                          boot.core/run-tasks       core.clj:  938
                            boot.core/boot/fn       core.clj:  948
          clojure.core/binding-conveyor-fn/fn       core.clj: 1938
                                          ...

from boot-cljsjs.

timerooney avatar timerooney commented on July 20, 2024

At least in the case of vis.js on Windows, unzip in cljsjs.boot-cljsjs.packaging is not fully unzipping the archive. However, the sequence between BEGIN and END is completed before the deletion is attempted, so my initial guess for the cause of the issue was incorrect.

(c/deftask unzip
  [p paths PATH #{str} "Paths in fileset to unzip"]
  (let [tmp (c/tmp-dir!)]
    (c/with-pre-wrap fileset
      (let [archives (filter (comp paths c/tmp-path) (c/ls fileset))]
        ;;; BEGIN
        (doseq [archive archives
                :let [zipfile (ZipFile. (c/tmp-file archive))
                      entries (->> (.entries zipfile)
                                   enumeration-seq
                                   (remove #(.isDirectory %)))]]
          (util/info "Extracting %d files\n" (count entries))
          (doseq [entry entries
                  :let [target (io/file tmp (.getName entry))]]
            (io/make-parents target)
            (with-open [is (.getInputStream zipfile entry) ]
              (io/copy is target))))
        ;;; END
        (-> fileset (c/rm archives) (c/add-resource tmp) c/commit!)))))

from boot-cljsjs.

timerooney avatar timerooney commented on July 20, 2024

I can confirm that this issue does not effect Debian 9 using cljsjs.boot-cljsjs 0.5.2 and cljsjs.boot-cljsjs 0.6.0. Presumably, this issue is exclusive to Windows, but I did not thoroughly verify it. Here is my basic system information:

> uname -a
Linux hostname 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux

from boot-cljsjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.