This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-13
Channels
- # babashka (3)
- # beginners (91)
- # calva (10)
- # cherry (1)
- # clj-commons (1)
- # clj-kondo (8)
- # clojure (19)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (16)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-norway (2)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # cursive (12)
- # data-science (4)
- # datalevin (3)
- # emacs (16)
- # events (9)
- # hyperfiddle (1)
- # juxt (1)
- # lsp (2)
- # missionary (2)
- # music (1)
- # nbb (14)
- # off-topic (15)
- # pathom (5)
- # releases (1)
- # shadow-cljs (41)
- # sql (10)
- # squint (13)
- # vim (7)
- # xtdb (35)
Trying to compile a file with the following results in Cannot infer target type in expression (. (. Foo -prototype) -bar)
(deftype Foo []
Object
(bar [this] nil))
Tried this using cljs.main
and didn't see any such warnings. Seems like it was addressed awhile ago in this ticket - https://clojure.atlassian.net/browse/CLJS-2862, and I'm using the latest shadow-cljs / clojurescript version@colinkahn I get no such warning. you sure you are on the latest versions? people often forget that the package.json version doesn't matter when using deps.edn/project.clj?
I was double checking using --cli-info
, which gives me:
=== Version
jar: 2.19.8
cli: 2.19.8
deps: 1.3.2
config-version: 2.19.8
I can get it from running npx shadow-cljs compile :app
with a shadow-cljs.edn
that looks like:
;; shadow-cljs configuration
{:source-paths ["src" "test"]
:dependencies
[]
:builds
{:app {:target :browser
:output-dir "public/js"
:asset-path "/js"
:modules
{:main {:init-fn example.browser/init}}}}}
(ns example.browser)
(deftype Foo []
Object
(bar [this] nil))
(defn init []
(js/console.log (Foo.)))
Hi, using shadow-cljs with a dependency on a library called membrane with this in the deps.edn:
:deps/prep-lib {:alias :build
:fn compile
:ensure "target/classes"}
and get this error:
Error building classpath. The following libs must be prepared before use: [com.phronemophobic/membrane]
cannot work out how to resolve it, clojure -X:deps prep doesn't appear to be doing anythingI have a deps.edn like:
{:deps {io.github.phronmophobic/membrane {:git/sha "75d38cca6973a4cdd073d3c0a41cb7fb3f48ad77"}}}
and then the following terminal session:
❯ clj
Error building classpath. The following libs must be prepared before use: [io.github.phronmophobic/membrane]
/tmp/prep
❯ clj -X:deps prep
Prepping io.github.phronmophobic/membrane in /Users/dan/.gitlibs/libs/io.github.phronmophobic/membrane/75d38cca6973a4cdd073d3c0a41cb7fb3f48ad77
WARNING: compile already refers to: #'clojure.core/compile in namespace: build, being replaced by: #'build/compile
warning: [options] bootstrap class path not set in conjunction with -source 8
/tmp/prep
❯ clj
Clojure 1.11.1
user=> (doto 'counter require in-ns)
counter
counter=> (java2d/run #(counter @counter-state))
#:membrane.java2d{:repaint #object[membrane.java2d$run$fn__3719 0x38cf3ae1 "membrane.java2d$run$fn__3719@38cf3ae1"], :frame #object[javax.swing.JFrame 0x4f7bb8df "javax.swing.JFrame[frame0,0,38,80x28,layout=java.awt.BorderLayout,title=Membrane,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,28,80x0,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]"]}
counter=>
was looking for that membrane git commit hash and it's ahead of the latest one I've pulled
Trying to test out SABs with shadow. I need to enable COOP/COEP for crossOriginIsolated
and I've added this to my config:
:dev-http
{8280 {:root "resources/public"
:push-state/headers {"content-type" "text/html; charset=utf-8"
"Cross-Origin-Opener-Policy" "same-origin"
"Cross-Origin-Embedder-Policy" "require-corp"}}}
But js/crossOriginIsolated
is still false. Is the only way to get this working by setting up https or am I missing something? I think I had it working in figwheel and I don't recall setting up any https certs.