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

NPE in sort-reqs #342

Open
agriffis opened this issue Dec 4, 2024 · 1 comment
Open

NPE in sort-reqs #342

agriffis opened this issue Dec 4, 2024 · 1 comment

Comments

@agriffis
Copy link

agriffis commented Dec 4, 2024

This is similar to an issue previously reported at #310 (comment)

(ns foo (:require [a.b.c :refer []]))

This fails for me with

When :list called an option-fn named 'sort-reqs' it failed because: java.lang.NullPointerException

I don't know what :refer [] means here. Blame my coworker. But the formatter probably shouldn't fail. 😂

zprint 1.2.9

@kkinnear
Copy link
Owner

kkinnear commented Dec 4, 2024

Thank you very much! The formatter certainly shouldn't fail, and I can reproduce it. I will fix it in the next release. It isn't a trivial fix because the code that rewrites things (as in sorting them) is rather complex.

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

2 participants