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

release 0.35.0 has spammy output #2206

Open
ghorn opened this issue Sep 9, 2024 · 3 comments
Open

release 0.35.0 has spammy output #2206

ghorn opened this issue Sep 9, 2024 · 3 comments

Comments

@ghorn
Copy link

ghorn commented Sep 9, 2024

In a recent release (I think 0.35.0), we get a lot more output when we bazel build. It spams the terminal. I'm not sure if this mainly affects bigger corporate repos with lots of dependencies, or if it also affects smaller projcts.

I see something like:

Fetching ...foobar; Running whl_library.ResolveRequirement(rules_python~~pip~foo_some_package, some_package=2.3.4 --hash=sha256:98471230984712039847102398471203984172043298 --hash=sha256:324293487239482374823749238472398472984 --hash=sha256:2319412730413749810297381209384712039. --hash=sha256:1343495834978534270953498753439084252730 ........

Looks like the relevant code is

desired behavior

Make the output much shorter, preferably fitting into one line.

@rickeylev
Copy link
Contributor

Ah right. That requirement variable has not just the version, but all the hashes, too.

The intent here was to have it show what package and version it was resolving, not the entire set of hashes (that's a bit much)

@ghorn
Copy link
Author

ghorn commented Sep 10, 2024

Glad it's not more complicated. Is the fix obvious to you?

@rickeylev
Copy link
Contributor

I think just snip off the requirement value put into the log message at , or some equivalent.

Something like:

op = op_tmpl.format(name = rctx.attr.name, requirement = rctx.attr.requirement.partition(' ')[0])

around L247

Happy to approve a PR

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