Closed Jaehwa-Noh closed 20 hours ago
@Jaehwa-Noh can you run these commands step-by-step for the :ui-test-hilt-manifest
module and see what does not work?
(don't forget to replace the variables)
@SimonMarquis
gradlew generateModulesGraphvizText -Pmodules.graph.output.gv="/tmp/feature_bookmarks.gv" -Pmodules.graph.of.module=":feature:bookmarks" --rerun
1-1. output
digraph G { ":feature:bookmarks" -> ":core:ui" ":feature:bookmarks" -> ":core:designsystem" ":feature:bookmarks" -> ":core:data" [color=red style=bold] ":core:ui" -> ":core:analytics" ":core:ui" -> ":core:designsystem" ":core:ui" -> ":core:model" ":core:data" -> ":core:common" ":core:data" -> ":core:database" [color=red style=bold] ":core:data" -> ":core:datastore" ":core:data" -> ":core:network" ":core:data" -> ":core:analytics" ":core:data" -> ":core:notifications" ":core:database" -> ":core:model" [color=red style=bold] ":core:datastore" -> ":core:datastore-proto" ":core:datastore" -> ":core:model" ":core:datastore" -> ":core:common" ":core:network" -> ":core:common" ":core:network" -> ":core:model" ":core:notifications" -> ":core:model" ":core:notifications" -> ":core:common" }
dot -Tsvg "/tmp/feature_bookmarks.gv" | sed 's/<!--/\x0/-->\x0/g' | grep -zv '^<!--' | tr -d '\0' | xmllint --format - \ "docs/images/graphs/feature_bookmarks.svg"
2-1. output
dot -Tsvg "/tmp/feature_bookmarks.gv" | sed 's/<!--/\x0/-->\x0/g' | grep -zv '^<!--' | tr -d '\0' | xmllint --format - \ "docs/images/graphs/feature_bookmarks.svg" -:4: parser error : Start tag expected, '<' not found Generated by graphviz version 11.0.0 (20240428.1522) ^
I found the problem and fixed it. #1505
the problem is the sed just remove "<!--" from .svg
files.
Thank you.
Comments are removed on purpose from the SVG files.
The issue is certainly related to the grep version you are running not being able to handle nul characters. Someone already reported that a few weeks ago, but I don't find the comment anymore.
I think the best option would be to simply use a dedicated tool for that, like https://github.com/svg/svgo
If the problem is grep
version, I can remove grep
from the command line.
https://github.com/android/nowinandroid/pull/1505/commits/040c05b96cb9d6231485294bad93ba865d6962a4
Your approach, using dedicated tool, and my plain sed command both are good to solve this issue.
You can see the plain sed result in here. https://sed.js.org/?snippet=zq7kBo
Would you mind making the generation of module graphs in general and not just on specific platform?
@JackEblan Good suggestion. Maybe we should put this on CI for SSOT like screenshot tests.
@SimonMarquis How did you command Dependabot takes a graph? https://github.com/android/nowinandroid/pull/1506/commits/c514b9b94bb89696b593330032e79d5fbeac28e1
If the problem is grep version, I can remove grep from the command line. Your approach, using dedicated tool, and my plain sed command both are good to solve this issue.
@Jaehwa-Noh You can't remove a command like that and still expect it to work 😅
Maybe we should put this on CI for SSOT like screenshot tests.
This would indeed be a solution, but I'll let the maintainers decide if it's worth adding an extra CI step. (This would obviously require more work, and even more specific CI scenarios to handle).
How did you command Dependabot takes a graph?
I did not. I simply forgot I had the dependabot's git config locally 🙈
Is there an existing issue for this?
Is there a StackOverflow question about this issue?
What happened?
When I run the
generateModuleGraphs.sh
, build was failed and gave merely blank text output. I don't know Is this error just on me? Nobody get same errors and blank outputs?Relevant logcat output
Code of Conduct