Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nREPL #179

Open
blindcoding9 opened this issue Apr 25, 2023 · 1 comment
Open

nREPL #179

blindcoding9 opened this issue Apr 25, 2023 · 1 comment

Comments

@blindcoding9
Copy link

blindcoding9 commented Apr 25, 2023

I'm trying to run the REPL middleware but I'm not able to.

Shouldn't I see the result of (range 10) in Portal?

project.clj

(defproject clean "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.11.1"]
                 [djblue/portal "0.40.0"]
                 [ch.qos.logback/logback-classic "1.4.5"]]
  :repl-options {:nrepl-middleware [portal.nrepl/wrap-portal]})

core.ns

(ns clean.core
  (:require [portal.api :as p]
            [portal.api :as p]))

(p/open)

(add-tap portal.api/submit)

(tap> 123)
(range 10)

portal

image

@djblue
Copy link
Owner

djblue commented Apr 25, 2023

Since editor tooling will also use eval and it causes a lot of noise being sent to portal. The nREPL middleware checks if a file is included for an eval to distinguish between tooling and user evals. This is my best guess as to why values aren't being sent to portal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants