Fork me on GitHub
#shadow-cljs
<
2021-06-27
>
xceno08:06:30

Hey thanks for figuring that out guys, that was my error as well!

javi10:06:58

In the `:bootstrap` target, is there any way to add extra data-readers for custom tagged literals?

thheller07:06:07

can you explain what you mean? I don't really understand the question?

thheller07:06:21

I mean what is specific about :bootstrap? you are controlling the compiler in the host-build, so you'd set them?

javi10:06:03

sorry, just saw this, i had notifications off. followed your advice in the clojurescript thread and it worked.

👍 3
Pavel KlavĂ­k18:06:22

Hi, we have recently encountered the following problem on multiple computers while modifying source files and saving them:

[:client] Build failure:
ExecutionException: java.io.FileNotFoundException: C:\Shared\orgpad\resources\public\js\compiled\cljs-runtime\orgpad.client.effects.core.js.map (The requested operation cannot be performed on a file with a user-mapped section open)
        java.util.concurrent.FutureTask.report (:-1)
        java.util.concurrent.FutureTask.get (:-1)
        clojure.core/deref-future (core.clj:2304)
        clojure.core/deref (core.clj:2324)
        clojure.core/deref (core.clj:2310)
        clojure.core/run!/fn--8813 (core.clj:7717)
        clojure.lang.PersistentVector.reduce (PersistentVector.java:343)
        clojure.core/reduce (core.clj:6829)
        clojure.core/run! (core.clj:7712)
        clojure.core/run! (core.clj:7712)
        shadow.build.async/wait-for-pending-tasks!/fn--10176 (async.clj:25)
        clojure.lang.Atom.swap (Atom.java:37)
        clojure.core/swap! (core.clj:2356)
        clojure.core/swap! (core.clj:2349)
        shadow.build.async/wait-for-pending-tasks! (async.clj:23)
        shadow.build.async/wait-for-pending-tasks! (async.clj:19)
        shadow.build/flush (build.clj:476)
        shadow.build/flush (build.clj:467)
        shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:364)
        shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:344)
        shadow.cljs.devtools.server.worker.impl/do-resource-update (impl.clj:531)
        shadow.cljs.devtools.server.worker.impl/do-resource-update (impl.clj:486)
        shadow.cljs.devtools.server.util/server-thread/fn--14066/fn--14067/fn--14075 (util.clj:284)
        shadow.cljs.devtools.server.util/server-thread/fn--14066/fn--14067 (util.clj:283)
        shadow.cljs.devtools.server.util/server-thread/fn--14066 (util.clj:256)
        java.lang.Thread.run (:-1)
Caused by:
FileNotFoundException: C:\Shared\orgpad\resources\public\js\compiled\cljs-runtime\orgpad.client.effects.core.js.map (The requested operation cannot be performed on a file with a user-mapped section open)
        java.io.FileOutputStream.open0 (:-2)
        java.io.FileOutputStream.open (:-1)
        java.io.FileOutputStream.<init> (:-1)
         (io.clj:230)
         (io.clj:230)
         (io.clj:69)
         (io.clj:166)
         (io.clj:166)
         (io.clj:69)
         (io.clj:119)
         (io.clj:104)
        clojure.core/apply (core.clj:669)
        clojure.core/spit (core.clj:6956)
        clojure.core/spit (core.clj:6956)
        shadow.build.output/generate-source-map-regular (output.clj:208)
        shadow.build.output/generate-source-map-regular (output.clj:173)
        shadow.build.output/generate-source-map (output.clj:222)
        shadow.build.output/generate-source-map (output.clj:212)
        shadow.build.output/flush-source/fn--10254 (output.clj:249)
        shadow.build.output/flush-source (output.clj:245)
        shadow.build.output/flush-source (output.clj:224)
        shadow.build.output/flush-sources/fn--10274 (output.clj:257)
        shadow.build.async/queue-task/fn--10171 (async.clj:15)
        clojure.core/apply (core.clj:667)
        clojure.core/with-bindings* (core.clj:1977)
        clojure.core/with-bindings* (core.clj:1977)
        clojure.core/apply (core.clj:671)
        clojure.core/bound-fn*/fn--5767 (core.clj:2007)
        java.util.concurrent.FutureTask.run (:-1)
        java.util.concurrent.ThreadPoolExecutor.runWorker (:-1)
        java.util.concurrent.ThreadPoolExecutor$Worker.run (:-1)
        java.lang.Thread.run (:-1)
This can be fixed by kiling the process running on port 7000 which is nREPL for our development server. Is this something caused by Shadow-cljs or source maps handled by Chrome? I am running :loader-mode :eval in the Shadow-cljs config.

Pavel KlavĂ­k19:06:39

Ok, so basically killing our development server and restarting it again will fix the issue, since it is not serving these files anymore and the tab in Chrome closes.

thheller19:06:51

> The requested operation cannot be performed on a file with a user-mapped section open

thheller19:06:10

don't know what that means. shadow-cljs is trying to write the source maps but can't because of that

thheller19:06:55

what causes it I don't know. is this some network shared folder or so maybe? might be another process working on that directory or disk?

thheller19:06:32

maybe you have two shadow-cljs instances running and both trying to write source maps at the same time?

Pavel KlavĂ­k20:06:08

No network folder.

Pavel KlavĂ­k20:06:19

No two instances.

Pavel KlavĂ­k22:06:42

I will try to debug this further when it happens again, for instance to see whether turning Chrome will fix it. It is rather strange.