I'm trying to use portal inside a larger clojure app via leiningen
lein repl.
user=> (require '[portal.api :as p])
Syntax error compiling at (portal/runtime/jvm/launcher.clj:1:1).
namespace 'portal.runtime.jvm.server' not found
What could be a reason for that?
This is using latest portal version 0.35.0 - defined in ~/.lein/profiles.clj.
It works fine when used outside the project (`lein repl` with no project.clj)Very weird, not sure how profiles.clj interacts with project.clj 🤔 I would expect all files in the jar to be available or unavailable.
I’ll try to debug it a bit
I found the problem by trying to load the portal.runtime.jvm.server namespace
Caused by: java.lang.RuntimeException: No such var: server/as-channel
at clojure.lang.Util.runtimeException (Util.java:221)
It turned out that we were using an old http-kit version (2.2.0).
Upgrading to 2.6.0 fixed the problemI'm on a new machine that I'm not quite used to yet but I get this error when I call portal/open:
; Execution error (ExceptionInfo) at portal.runtime.jvm.launcher/get-config (launcher.clj:26).
; No config file found: vs-code.ednMight need to install the portal vscode plugin
aha, silly me! I completely forgot that I did this on my old comp 💀 thanks @djblue