portal

jumar 2022-12-13T09:30:09.115399Z

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)

djblue 2022-12-13T17:01:55.477649Z

Very weird, not sure how profiles.clj interacts with project.clj 🤔 I would expect all files in the jar to be available or unavailable.

jumar 2022-12-13T18:21:45.132649Z

I’ll try to debug it a bit

jumar 2022-12-15T04:53:48.284769Z

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 problem

liebs 2022-12-13T18:15:03.185619Z

I'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.edn

djblue 2022-12-13T18:16:28.142559Z

Might need to install the portal vscode plugin

🙌 1
liebs 2022-12-13T18:17:53.403669Z

aha, silly me! I completely forgot that I did this on my old comp 💀 thanks @djblue