Fork me on GitHub
#clojure-dev
<
2019-04-23
>
john00:04:20

Related: Fastly's Cloud Workers are essentially just JS WebWorkers, with lots of tenants on different isolates in the same JS VM

souenzzo03:04:13

:import from ns do not load cljc files Is it a know issue?

;; should work, once it was required first
;; clj -Srepro -Sdeps '{:deps {import-bug {:git/url "" :sha "fd49010c7fee88bc3fb705d5fd494718bbd16f18"}}}' -m ok
;; should fail, once import will not search for cljc files
;; clj -Srepro -Sdeps '{:deps {import-bug {:git/url "" :sha "fd49010c7fee88bc3fb705d5fd494718bbd16f18"}}}' -m fail
https://gist.github.com/souenzzo/e23944fac595077f372aa662cde5ff91

seancorfield03:04:16

@souenzzo Wouldn't it need to have :load-ns true on defrecord for the import to auto-load the namespace?

Alex Miller (Clojure team)03:04:23

Supported options:
  :load-ns - if true, importing the record class will cause the
             namespace in which the record was defined to be loaded.
             Defaults to false.

souenzzo03:04:30

https://gist.github.com/souenzzo/e23944fac595077f372aa662cde5ff91/1335ce6ddafcce916c9a081ecf55c956ceb62645 Trying with this rev, I still fails clj -Srepro -Sdeps '{:deps {import-bug {:git/url "" :sha "1335ce6ddafcce916c9a081ecf55c956ceb62645"}}}' -m fail

Alex Miller (Clojure team)03:04:04

import is for classes. you have to compile before classes exist that can be imported?

Alex Miller (Clojure team)04:04:42

in the ok case, the require is compiling the class and loading it in the DCL so it's found in the import

Alex Miller (Clojure team)04:04:07

if you added a compile step like: clj -e "(binding [*compile-path* \".\"] (compile 'record))" then the fail case will work

Alex Miller (Clojure team)04:04:03

stepping way back, why do you need to import in the first place?

seancorfield04:04:55

Hmm, sounds like :load-ns doesn't do quite what I thought then (I haven't used it -- I always just require the namespaces containing records).

Alex Miller (Clojure team)04:04:08

it's really designed for the case where you are loading a Clojure record from Java

👍 4
Alex Miller (Clojure team)04:04:55

and you already have aot'ed

Alex Miller (Clojure team)21:04:41

In case anyone happens to notice and wonders, I am actively working on moving the last useful vestiges of the old dev wiki https://dev.clojure.org/display/community to either http://clojure.org or some kind of archive (still TBD for the design pages) and I'm planning to fully decommission the old site. This ancient version of Confluence has become an active attack vector for this box.

Alex Miller (Clojure team)21:04:44

Additionally, I am working on migrating jira to a modern cloud instance of jira. Lot of tbds still but it's in work.

seancorfield21:04:31

Awesome! I know that's unpleasant work but I appreciate it!

👍 8
Alex Miller (Clojure team)21:04:59

it's like jabbing yourself in the eye with a stick

12
gfredericks22:04:15

I assume this is in scope? https://dev.clojure.org/display/design/test.check I put some non-trivial stuff there

andy.fingerhut23:04:35

but it's like, a shiny stick, right? 🙂