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

Binding to suppress print output not supported by pod #72

Open
Kaspazza opened this issue Sep 23, 2024 · 2 comments
Open

Binding to suppress print output not supported by pod #72

Kaspazza opened this issue Sep 23, 2024 · 2 comments

Comments

@Kaspazza
Copy link

Kaspazza commented Sep 23, 2024

I'm using tools bbuild for building pom.xml, which prints messages to *err* using tools deps utils function e.g. here.
I would like to have control on what's printed, so I did simple:

(let [s (new java.io.StringWriter)]
(binding [*out* s *err* s] (clj-build-api/write-pom params)))

This binding takes no effect and there is no way to suppress the messages due to pod not being affected by binding.

Temporary solution:
After starting, evaluating
(require 'clojure.tools.deps.util.io :reload)
makes binding to work

@Kaspazza
Copy link
Author

@borkdude
Copy link
Contributor

I think in the case of tools.bbuild this might work: (require '[clojure.tools.deps.util.io](http://clojure.tools.deps.util.io/) :reload). The issue here is that the tools.build.native pod exposes this native namespace, but in tools.bbuild it could just load this namespace from source and then the binding would work. So perhaps this is just fixable in tools.bbuild itself, by reloading this namepace AND/OR removing the exposed native namespace in the tools.build.native pod. I'm not sure we even need to expose it in the pod for it to be useful as a standalone thing.

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