Comments (3)
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.
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.
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)
- Provide a way to have multiple externs HOT 3
- Browserified npm modules HOT 4
- Allow users to specify additional provides clauses HOT 3
- Trouble with tasks for DraftJS HOT 1
- Provide Extern generation task
- npm task HOT 5
- Sanity check task HOT 1
- Replace content fails on Windows HOT 2
- The minify task doesn't seem to work on Windows HOT 1
- Mark is not supported HOT 2
- D3 externs error HOT 1
- deps-cljs task produces invalid deps.cljs on Windows (backslashes in :externs array)
- Incorrect handling of tgz archives HOT 8
- Weird directory structure HOT 1
- Invalid cookie header when fetching zip from git
- Minifying es6 HOT 3
- validate-checksums doesn't see files from minify task
- ClassNotFoundException on Java 12 HOT 3
- it is valid for :global-exports key to be a string HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boot-cljsjs.