-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unable to generate a module graph #271
Comments
…uated block that waits for all projects and subprojects to get evaluated
Hey, thanks for describing the issue into such detail and testing it on the way 👏 I actually think you found a way how it should be done correctly 🤔 and I also suspect this issue was related: #230 The bug you are experiencing is happening because the dependencies are not loaded at the moment the plugin is trying to read them. Thank you very much for discovering this! Let's get that PR merged :) |
I will keep the issue open before the release goes out. :) not fixed until released. |
Hello @jraska, |
Hey, sorry for the delay. I'm aware it's expected. I hope max 2 weeks I need to figure out something in the background. |
Okay, thanks! |
Solved. Thanks for the patience and the contribution :) |
Awesome! |
Hey, I will be reverting this change temporarily as it causes the tasks not to be found in many scenario without the flag Current plan
|
After adding the dependency to the plugin and attempting to generate a dependency graph for the app module, I was confronted with generation errors.
Then I tried running a simple ./gradlew generateModulesGraphStatistics for the whole project and got this output:
Thinking I might have misconfigured something, I made sure I followed the implementation as in Google's Now in Android project (added plugin dependency in root level gradle file and set apply to 'true'). I tried generating the module graph in the NIA project, as well as running the statistics task and this is the result:
In order to debug the plugin I included it as a composite build and started digging.
It was obvious that all the subprojects weren't getting loaded or recognized. So I played around and changed plugin initialization a bit.
After applying this change, the project and all of its subprojects got loaded.
In order to test this on other projects such as NIA, I forked the repo and published some versions with the above-mentioned changes to Jitpack.
This change seems to not affect the NIA project, although I only tested out generating module graphs via their script and running the statistics task.
@jraska
What do you think about these changes?
Is there anything specific I'd need to take into consideration and verify?
I know this might seem like overkill for needs of a single project, so any feedback on how we might fix this locally in order to avoid applying changes to the plugin library would be appreciated!
P.S. Currently the project I'm working on is using the forked version of your plugin, since it's crucial to our restructuring and remodularization initiative, since we're having long build times.
Thank you for your motivating presentation on the Droidcon and Medium articles on this topic, it's been really inspiring and one of the driving forces to resolve technical debt in our project 💪
UPDATE 22.8.2024
Fixed in this PR --> #272
The text was updated successfully, but these errors were encountered: