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

Treat uneval nodes as comments #294

Merged

Conversation

tobias
Copy link
Contributor

@tobias tobias commented Feb 18, 2021

Uneval nodes throw an UnsupportedOperationException if node/sexpr is
called on them, which will break get-first-sexp if it is given
file-content that starts with #_ whatever.

This includes uneval nodes in the set of nodes we should skip when
looking for first & last sexps.

Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
    • there is no CONTRIBUTING.md, I assume this should be .github/CONTRIBUTING.md?
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (run lein do clean, test)
    • No! I get:
Exception in thread "main" java.lang.RuntimeException: Map literal must contain an even number of forms, compiling:(refactor_nrepl/artifacts.clj:25:1)

But I get the same thing on master, so I'm not sure what is going on there.

  • Code inlining with mranderson works and tests pass with inlined code (run ./build.sh install -- takes a long time)
    • There is no ./build.sh. I have installed this with lein with-profile +plugin.mranderson/config install and have confirmed it is working for me.
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

Uneval nodes throw an UnsupportedOperationException if node/sexpr is
called on them, which will break get-first-sexp if it is given
file-content that starts with `#_ whatever`.

This includes uneval nodes in the set of nodes we should skip when
looking for first & last sexps.
@tobias tobias force-pushed the handle-namespaces-with-uneval-first branch from a323c9a to 48a7041 Compare February 18, 2021 23:01
@bbatsov bbatsov merged commit a49207b into clojure-emacs:master Feb 20, 2021
@bbatsov
Copy link
Member

bbatsov commented Feb 20, 2021

But I get the same thing on master, so I'm not sure what is going on there.

Well, it I see on the CI tests mostly pass (apart from the known issue with Clojure 1.8). Thanks for fixing this!

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

Successfully merging this pull request may close these issues.

2 participants