-
Notifications
You must be signed in to change notification settings - Fork 512
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
[FR] simplify gazelle_python.yaml #1890
Comments
I am not sure if the complexity is worth it as the package imports may overlap at the top level. It could be possible to improve it, but I am not sure how realistic it is. Let's imagine a case where you write code
and the I think this is related to #1877, but might not be. If somebody was to implement it, I think it should:
|
One possibility is that we only simplify the generated yaml. During the generation, we find the top bifurcation and then cut the branches. And this is well compatible. for example
to
|
One extra idea how we could simplify the Such thing could be achieved in two ways:
I personally think that 1. might be the better solution, but a little bit more involved, because we could also set different The second approach would be more doable as golang could be definitely taught how to parse That way we may be able to cut the file size by a lot without doing any more advanced techniques like what was suggested in the comment above. |
Maybe I missed something. Whether it is 1 or 2, users need to ensure that all direct dependencies need to live in requirements.in, otherwise we will not be able to resolve this dependency. This requirement is reasonable, but it is difficult to achieve (most projects should not be able to do it because python does not have the same visibility restrictions as bzlmod). |
🚀 feature request
Relevant Rules
gazelle_python.yaml
Description
A clear and concise description of the problem or missing capability...gazelle_python.yaml
will list all libs on packagesI have a three lines only requirements.in
20 packages requirements.txt
but received a 110KB gazelle_python.yaml which has 2517 keys at
.manifest.modules_mapping
It is too big.
Describe the solution you'd like
If you have a solution in mind, please describe it.Can we simplify it and make
gazelle_python.yaml
have only top level package name?In my shallow cognition, such a long imports seems meaningless.
I'd like to support it if I can.
Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?no
The text was updated successfully, but these errors were encountered: