-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Evaluate block does not work for top-most block #228
Comments
It's not a bug, nor a misunderstanding - it's what we call a "leaking abstraction" 🤣 In the beginning, both "evaluate top block" and "evaluate block" did not evaluate anything - because it's not a "block", really, just the "current var". But then I changed the way I detect top-blocks so I could re-use the code on VSCode.... and then things became weird. The current approach does detect top-level variables as "top-blocks", and also sometimes detects more things (like I could add support for I will probably try to get the current "block", if it it does not exist, it'll get the current "var". What do you think? |
Thanks again for an awesome explanation about the intricacies of how Chlorine work under the hood. I think what you're suggesting makes sense. I don't think it's worth pursuing a solution to this until you've started the migration. While I haven't used Pathom myself, I can see the benefit of being able to express the parsing more fluently instead of having to do multiple passes over the result. While I'm still learning Clojure myself (day 3 to be exact 😄), I'd be happy to contribute in financial terms if needed. Do you have any preferred medium for financial contributions? |
First of all, thanks for all work you've put into Chlorine, it's a wonderful package. ❤️
I'm not sure this is a bug or not. If it's not, feel free to close this issue. 🙂
I thought the difference between
Chlorine: Evaluate Block
andChlorine: Evaluate Top Block
is thatChlorine: Evaluate Block
will evaluate the current form (relative to the cursor position) whileChlorine: Evaluate Top Block
would evaluate the top-most form (relative to the cursor position).The above example would evaluate to
(1 2 3 4 5 6 7 8 9)
usingChlorine: Evaluate Block
while it would evaluate to(2 4 6 8 10 12 14 16 18)
usingChlorine: Evaluate Top Block
. Of course, I could achieve the same thing by moving my cursor to the start of the line and runChlorine: Evaluate Block
, correctly giving me(2 4 6 8 10 12 14 16 18)
as well.This all make sense to me. Now here's a different example.
The above example would evaluate to
java.lang.Thread$State
usingChlorine: Evaluate Top Block
. ButChlorine: Evaluate Block
does not evaluate this example at all.Is that a bug, or am I just misunderstanding how these features work?
The text was updated successfully, but these errors were encountered: