portkey-cloud / portkey

Live-coding the Cloud
144 stars 7 forks source link

boot+portkey seems to ignore lib/*.jar #40

Closed qq00 closed 6 years ago

qq00 commented 6 years ago
  1. Consider the following code:
(defn b2 []
  (str "hello world"))
(pk/mount! b2 "/")

2a. Running in lein repl, we get a 4.5MB zip, and everything works. 2b. Running in boot, we get a 300kb zip, with error

{"errorMessage":"Error loading class portkey.LambdaStub: clojure/lang/IFn","errorType":"java.lang.NoClassDefFoundError"}
  1. WTF is going on? Downloading the zips from aws, we see that:
    (in lein version)
    ls lib
    asm-5.0.4.jar           kryo-4.0.0.jar
    carbonite-1.4.0.jar     minlog-1.3.0.jar
    chill-java-0.3.5.jar        objenesis-2.2.jar
    clojure-1.9.0-beta2.jar     reflectasm-1.11.3.jar
    core.specs.alpha-0.1.24.jar spec.alpha-0.1.134.jar

These files do not exist in the boot version.

  1. If we copy these files over into the boot version, re-zip, and re-upload, the boot version works too.

  2. Problem: it appears that the boot version is somehow not attaching the *.jars