Btw I’m in the twilight zone: more logging reveals it’s my class that has extra fields… matching a jdk7 implementation while there’s no such thing on the class path.…
hello all, little update. 1) I run a little lambda/portkey that send emails to customer in prod (for real clients) 2) I have a personal objective, understanding all that is happening in portkey I am currently playing with ouroboros, just got how to attach an Angent to the running vm, next step is understanding what’s happening with transformer’s functions. Thanks you for helping me understand global design
akh, we can’t loose Christophe to the twilight zone of java classes
lol
by the way, do you know why when I launch the REPL I can retrieve the VM with attach
but once I try do to it in my REPL I have this error
UnsatisfiedLinkError Native Library /Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/libattach.dylib already loaded in another classloader java.lang.ClassLoader.loadLibrary0 (ClassLoader.java:1907)
don’t worry about this one, it’s indeed IntelliJ IDE
If I use a classic REPL, all is working great
and do you know if it’s IntelliJ or Cursive (before I pester Colin)?
let me check that
but how could I really know, cursive might use instrumentation also right ?
hum, Colin might know where to look anyway
Launch a java process with clojure.Main and the right classpath.
@cgrand sorry for the delay, it’s working great with clojure.main repl
must be a cursive “bug” or design
hum, ps aux
while running repl from Cursive would reveal classpath generated by intellij for the subprocess, and maybe hint at what is happening
/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/bin/java -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=54123:/Applications/IntelliJ IDEA CE.app/Contents/bin
Very useful
@baptiste-from-paris could you try (Class/forName "com.sun.tools.attach.VirtualMachine")
in a Cursive-sans-portkey repl?
ok, do that right now + I now have full notifications for this channel ^^
so, in a randam project clj repl WITH cursive and WITHOUT portkey, it’s working
(let [loader (.getContextClassLoader (java.lang.Thread/currentThread))
tools-jar (java.io.File. (System/getProperty "java.home") "../lib/tools.jar")
tools-jar-loader (java.net.URLClassLoader. (into-array [(.toURL tools-jar)]))
[_ pid] (re-matches #"([^@]*).*" (.getName (java.lang.management.ManagementFactory/getRuntimeMXBean)))]
(-> (Class/forName "com.sun.tools.attach.VirtualMachine" true tools-jar-loader)
(.getMethod "attach" (into-array [String]))
(.invoke nil (object-array [pid]))))
=> #object[sun.tools.attach.BsdVirtualMachine 0x5d8f3c00 "sun.tools.attach.BsdAttachProvider@78025dc1: 2327"]
with this one in the REPL
(-> (Class/forName "com.sun.tools.attach.VirtualMachine" true tools-jar-loader)
(.getMethod "attach" (into-array [String]))
(.invoke nil (object-array [pid])))
hmm, same native library already loaded by IntelliJ?
been using cider with nrepl so haven’t noticed, should try IntelliJ myselkf
worked with both, and I found out that they are both excellent tools but I really love class navigation of IntelliJ products
yes, I use it for Java browsing also
and I have to thank you also, it’s really good to have someone embarking on a journey with portkey 🙂
thx ^^
But the road will be long for me ^_^
whoa, was looking at creating unmount!
and undeploy!
to have tests that actually hit api gateway, so that I can be a bit more certain on my code that uses aws, and for this I’d need to clean after test and maybe users would wan’t to clean mounts as well. Now that I say this, for tests I probably could just remove the whole API, but there was a limit on API deletions per minute that I hit quite easily http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html, which is 2 per minute. Then again this could be done after running all tests.
anyways, had a problem with aws-clj-sdk (apigw/get-resources)
returning only first 25 items and I have more deployed
reading the code (https://github.com/portkey-cloud/aws-clj-sdk/blob/master/src/portkey/aws.clj#L216), figured out that I can just pass query parameters of the actual rest api (https://docs.aws.amazon.com/apigateway/api-reference/link-relation/restapi-resources/) in the body, like (apigw/get-resources {:rest-api-id "xxxx" :limit 100})
hmm, the link tracing for pagination though…
“In another class loader” is an interesting twist. Open issue please.