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

Namespace map context (#: syntax) is deleted when zprint style is indent-only #242

Closed
tflavin opened this issue Jun 9, 2022 · 4 comments

Comments

@tflavin
Copy link

tflavin commented Jun 9, 2022

zprint is deleting the namespace map context specified by the #: syntax when the style is indent-only.

(zp/zprint-file-str "#:a{:b 1}" "example")
=> "#:a{:b 1}"

(zp/zprint-file-str "#:a{:b 1}" "example" {:style [:indent-only]})
=> "{:b 1}"
@kkinnear
Copy link
Owner

kkinnear commented Jun 9, 2022

Thanks for the issue. That's really not good. That said, I'm interested that anyone actually uses :indent-only! It was a lot of work, so it is nice to know someone cares. I'll work on this and make sure it gets fixed soon. Namespaced maps have been a challenge all along the way, from parsing to handling them in .clj and .cljs. More later as I figure this out.

@kkinnear
Copy link
Owner

kkinnear commented Jun 9, 2022

I have fixed this, and it will be available in the next release, almost certainly called 1.2.4. It will be at least two weeks at the earliest before I can test and release a new version of zprint. I hope that this problem won't cause you too much pain in the interim. I was working on a large capability and expected to be a while before I packaged up the next release, but based partly on this problem, I'll move up my release schedule to get this fixed sooner than I had otherwise planned to release it.

Thank you again for noticing and submitting this issue!

@tflavin
Copy link
Author

tflavin commented Jun 10, 2022

No problem. I was just evaluating it against my codebase, so it's not hurting me as of now. I believe I noticed one other thing and will open a separate issue for that.

@kkinnear
Copy link
Owner

kkinnear commented Aug 2, 2022

Fixed in 1.2.4. Thanks for noticing this! (and the other one too!).

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