-
Notifications
You must be signed in to change notification settings - Fork 57
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
paredit fns that use internal global-find-by-node
do not work after zipper updated
#256
Comments
paredit/kill
and global-find-by-node
work incorrectly
Thanks @mrkam2! I can take a peek sometime soon! |
I'm starting to take a look at this one!
Thanks again for reporting, @mrkam2. Folks seem to be starting to use the paredit API a bit, and you've uncovered some very interesting flaws. |
paredit/kill
and global-find-by-node
work incorrectlyglobal-find-by-node
do not work after zipper updated
As I fix other issues, I'll update what I've fixed for this issue here:
|
Merged
lread
added a commit
that referenced
this issue
Feb 18, 2025
lread
added a commit
that referenced
this issue
Feb 18, 2025
Because of #256, slurp fns had to be rewritten. During rewriting: - address design flaw by deprecating existing `slurp` fns and adding replacement `slurp-`*`-into` fns (closes #339) - stop adding space char when preserving slurped newlines (closes #345) - review ambiguous `-slurp-`*-`fully` fn behaviour (closes #341) - when slurping, don't consider a node with `#_` uneval nodes empty (closes #338) - don't throw on rewrite-clj parseable but invalid clojure `{:a}` (closes #336) - slurping forward fully no longer throws when slurping into an empty seq that is last item in a seq (closes #335) - slurping backward at empty-seq at start of seq no longer throws (closes #334) - slurp forward now slurps when at empty-seq at end of seq (closes #333)
Merged
lread
added a commit
that referenced
this issue
Feb 18, 2025
Because of #256, slurp fns had to be rewritten. During rewriting: - address design flaw by deprecating existing `slurp` fns and adding replacement `slurp-`*`-into` fns (closes #339) - stop adding space char when preserving slurped newlines (closes #345) - review ambiguous `-slurp-`*-`fully` fn behaviour (closes #341) - when slurping, don't consider a node with `#_` uneval nodes empty (closes #338) - don't throw on rewrite-clj parseable but invalid clojure `{:a}` (closes #336) - slurping forward fully no longer throws when slurping into an empty seq that is last item in a seq (closes #335) - slurping backward at empty-seq at start of seq no longer throws (closes #334) - slurp forward now slurps when at empty-seq at end of seq (closes #333)
lread
added a commit
that referenced
this issue
Feb 19, 2025
`barf-forward` and `barf-backward` rewritten to not use `global-find-by-node`. Contributes to #256
lread
added a commit
that referenced
this issue
Feb 19, 2025
`barf-forward` and `barf-backward` rewritten to not use `global-find-by-node`. Contributes to #256
lread
added a commit
that referenced
this issue
Feb 19, 2025
lread
added a commit
that referenced
this issue
Feb 20, 2025
Fixes for splice-killing-forward, splice-killing-backward, split-at-pos. These are the final fns that relied on reader positional metadata, add in a test to confirm paredit works on zipper without this metadata. Closes #256
lread
added a commit
that referenced
this issue
Feb 20, 2025
Fixes for splice-killing-forward, splice-killing-backward, split-at-pos. These are the final fns that relied on reader positional metadata, add in a test to confirm paredit works on zipper without this metadata. Closes #256
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
rewrite-clj/rewrite-clj {:mvn/version "1.1.47"}
Platform
Clojure version:
1.11.1
Symptom
Two issues:
rewrite-clj.paredit/kill
incorrectly positions the zipper after performing the operation.Reproduction
Actual behavior
:wrong-pos
.[:wrong-pos 1 :nil-meta ]
.Expected behavior
2
.[:wrong-pos 1 :nil-meta 2]
Diagnosis
global-find-by-node
search that compares nodes meta not taking into account that new nodes havenil
meta.Action
Let me know if a PR is preferred.
The text was updated successfully, but these errors were encountered: