-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Racket: ConjureEvalBuf / ConjureEvalFile failures #643
Comments
I can replicate the error message when running Here's my log output:
What's happening is when evaluating the buffer, the I was able to run the $ racket stacker-test.rkt
36$ So, while you can edit There may be hope for evaluating files or buffers with Conjure because there is a racket-mode for Emacs which appears to be able to deal with the peculiarities of |
See #456 for related issue. |
Thanks for providing additional context @russtoku, I can reproduce this issue and agree the solution probably isn't a straightforward fix in Conjure. From my investigation, my hunch was that the I got this module working and reloading by removing the automatic calls to So I'm thinking maybe we only use |
I've added an option which isn't perfect but might be good enough for you for now and gives us some good data on what a good solution looks like. Try setting Not perfect, but a lever you can pull. Then maybe we work out exactly which I was also trying to see if I could load xrepl into the |
@Olical, your fix works! With
A minor nit would be that the virutal text reads:
It should be noted that while you can |
BTW, I think that it's safe to not append
|
I think it's used for when users print without a newline? I've had people
complain about that in the past IIRC 🤔
…On Sun, 2 Feb 2025, 22:00 Russ Tokuyama, ***@***.***> wrote:
BTW, I think that it's safe to not append (flush-output) with the Racket
code being sent to the REPL.
diff --git a/fnl/conjure/client/racket/stdio.fnl b/fnl/conjure/client/racket/stdio.fnl
index 7bbabd22..52798cd8 100644
--- a/fnl/conjure/client/racket/stdio.fnl
+++ b/fnl/conjure/client/racket/stdio.fnl
@@ -61,7 +61,7 @@
(log.append [(.. comment-prefix "Dropping #lang, only supported in file evaluation.")])
(s:gsub lang-line-pat ""))
s)]
- (.. code "\n(flush-output)")))
+ (.. code "\n")))
(fn eval-str [opts]
(with-repl-or-warn
—
Reply to this email directly, view it on GitHub
<#643 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACM6XM3V24FO66RRFJHWLD2N2IRPAVCNFSM6AAAAABWHWYUBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRZGU3TKNBYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ahhhh... |
Description
For certain
.rkt
files that work [1] upon opening in a buffer, using:ConjureEvalBuf
or:ConjureEvalFile
subsequently can lead to errors (at least for my setup [2] (^^; ).Examples of such errors include:
Note that I haven't yet experienced these errors for some other
.rkt
files. For the files I have examined, it appears that those that start with:are fine.
However, those that start with things that look like either:
seem to lead to the sorts of errors described above.
I haven't tested that many files though.
How to Reproduce
The code I tried with is from the online book "Beautiful Racket".
I followed the "full setup" instructions here which might be translated as:
raco pkg install --auto beautiful-racket
racket -l br/test
To obtain the code to reproduce the issue with, choose one of the following:
stacker.rkt
andstacker-test.rkt
), -OR-stacker.rkt
stacker-test.rkt
To experience the issue:
stacker-test.rkt
(the second of the two files above) in neovim36
appearing in the HUD (there may be a subsequent error message after as well -- not sure what that is about):ConjureEvalBuf
or:ConjureEvalFile
[1] By "work", I mean the HUD shows the expected evaluation result when the file is opened in the buffer initially.
[2] I'm using:
v0.11.0-dev-1623+g34d808b73c
v4.53.0
The text was updated successfully, but these errors were encountered: