shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
xceno 2021-06-27T08:09:30.286400Z

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

javi 2021-06-27T10:07:58.288300Z

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

thheller 2021-06-28T07:55:07.306200Z

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

thheller 2021-06-28T07:56:21.306400Z

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

javi 2021-06-28T10:47:03.309700Z

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

👍 1
2021-06-27T18:37:22.290700Z

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)
        <http://clojure.java.io/fn--11522|clojure.java.io/fn--11522> (io.clj:230)
        <http://clojure.java.io/fn--11522|clojure.java.io/fn--11522> (io.clj:230)
        <http://clojure.java.io/fn--11459/G--11428--11466|clojure.java.io/fn--11459/G--11428--11466> (io.clj:69)
        <http://clojure.java.io/fn--11496|clojure.java.io/fn--11496> (io.clj:166)
        <http://clojure.java.io/fn--11496|clojure.java.io/fn--11496> (io.clj:166)
        <http://clojure.java.io/fn--11472/G--11424--11479|clojure.java.io/fn--11472/G--11424--11479> (io.clj:69)
        <http://clojure.java.io/writer|clojure.java.io/writer> (io.clj:119)
        <http://clojure.java.io/writer|clojure.java.io/writer> (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.

2021-06-27T19:08:39.291900Z

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.

thheller 2021-06-27T19:31:51.292100Z

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

thheller 2021-06-27T19:32:10.292600Z

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

thheller 2021-06-27T19:32:55.293200Z

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?

thheller 2021-06-27T19:34:32.294Z

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

2021-06-27T20:09:08.294700Z

No network folder.

2021-06-27T20:09:19.295100Z

No two instances.

2021-06-27T22:35:42.295900Z

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.