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

Multi-line form oddness in 'lein repl' #211

Open
ingydotnet opened this issue Aug 4, 2023 · 1 comment
Open

Multi-line form oddness in 'lein repl' #211

ingydotnet opened this issue Aug 4, 2023 · 1 comment

Comments

@ingydotnet
Copy link

        ingy | technomancy: I noticed an oddity in `lein repl` yesterday. maybe nashi74 told you.
        ingy | https://gist.github.com/ingydotnet/cb11e16749495015056d285dee031b66
        ingy | not a big deal obviously but thought someone should know
 technomancy | ingy: ah, odd 
 technomancy | that would be handled by `reply` rather than leiningen directly; you can report it here: 
               https://github.com/trptcolin/reply
        ingy | https://gist.github.com/ingydotnet/33c35539c739a47b4b7a07ea3c09cad3 is clojure, 
               seems more normal eval order
        ingy | ok thanks
 technomancy | looks like just an issue with detecting the end of a form, right?
        ingy | no, it looks like in this situation it holds onto 1 complete form while waiting for the next
        ingy | EOFFBYONE ;)
 technomancy | right; like it mistakenly thinks the current form is incomplete 
        ingy | compare with https://gist.github.com/ingydotnet/e1791f9140f6da1240012b5e0297372d
        ingy | I thought it was a thing around the first line of a multilie 
        ingy | multi-line
        ingy | but it just holds one to 1 of them too long until the current line ends all forms
 technomancy | I mean the problem is it's going like "you gave me an incomplete form 
               so I'm going to wait till it's complete before evaluating anything"
        ingy | yeah not quite
        ingy | it;s like ok you didn't complete your forms but you did complete 3 of them, so I'll evaluate 2
        ingy | and keep 1 for myself for some reason I won't tell you ;0
 technomancy | gotcha
        ingy | :)     
@ingydotnet
Copy link
Author

The repro case from https://gist.github.com/ingydotnet/cb11e16749495015056d285dee031b66 above:

user=> (prn
  #_=> 1)
1
nil
user=> (prn
  #_=> 1) (prn
  #_=> 2) (prn
1
nil
  #_=> 3) (prn
2
nil
  #_=> 4)
3
nil
4
nil
user=> 

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

1 participant