-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Bug]: Used too much storage to store build intermediates #1161
Comments
If feel like this is not normal 🤯 Details of a test apk...
|
Found this issue 🕵️ preparing the fix with a report… |
Yes, I did it intentionally. I need to check if there are any compilation issues in the code. Sometimes I modify the ViewModel but Android Studio won't notify me if there are errors that exist in the ViewModelTests. So I have to compile everything to avoid failures in CI. |
And cleanup unnecessary transitive dependencies. Fixes android#1161
The main issue comes from robolectric being added to the runtime classpath of instrumented tests because it is transitively exported by
Here are some stats/results with different solutions:
|
@lihenggui the main issue has been fixed during this PR: I prepared a followup PR to clean things up a bit more in: You can close the issue 👍 |
Great, thank you! |
A question here, the dependency resolution behavior is reverted in the AGP 8.3.1 version.
Does that mean this issue will appear in the latest version again? |
This was not the fix. The fix was mostly removing robolectric-shadow from the |
My PR #1163 was also fixing the issue, before the AGP update. |
Is there an existing issue for this?
Is there a StackOverflow question about this issue?
What happened?
Usually, I will run this command to check there is no compile error in the project.
./gradlew --init-script gradle/init.gradle.kts --no-configuration-cache --no-daemon clean spotlessApply assembleRelease testClasses assembleAndroidTest --warning-mode all
I noticed that after finishing compiling, the size of the project folder grows rapidly, it will use about 15GB of disk space to store build intermediates.
![image](https://private-user-images.githubusercontent.com/5171312/298257194-0107b8ac-2c7d-4307-a475-ce266612b5e0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNTI2MzUsIm5iZiI6MTcyNjE1MjMzNSwicGF0aCI6Ii81MTcxMzEyLzI5ODI1NzE5NC0wMTA3YjhhYy0yYzdkLTQzMDctYTQ3NS1jZTI2NjYxM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WUzNDFjNzIwMzk0OWUzNzlhMzM0MGQwZmUxNzZhNGY3YzYwOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.6W0JClX-U47QVzhsZEoWdvMyyNDMj_bDzt4b_e8ygA4)
Each feature module took around 1.3G of disk space:
![image](https://private-user-images.githubusercontent.com/5171312/298257288-7b6f7d44-8af9-4ef7-aaf8-ceb6f8a5d823.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNTI2MzUsIm5iZiI6MTcyNjE1MjMzNSwicGF0aCI6Ii81MTcxMzEyLzI5ODI1NzI4OC03YjZmN2Q0NC04YWY5LTRlZjctYWFmOC1jZWI2ZjhhNWQ4MjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMTQ0NTM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9M2RkNzQ5ZGFhNDRjZjEzY2M3ZWFlOWQ2MzJiZmE1NjViZDg5YWVjM2YzMDM2NDliM2RjYTM1YTAwNDIwNTBiYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.hExLOuSMjH7-hziEad5hoiGvUm1HLwl3eCS7XYdmUEY)
![image](https://private-user-images.githubusercontent.com/5171312/298257319-b1923216-9e3f-4f76-be63-edc1b9c69744.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI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UNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMTQ0NTM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmM4YjBhNTIxMjdlMWQ4YmZiZjk1ZTQ2NDQxZjI3YWVjNDhiN2JmZGM5ODhjM2E3MTIzZTFlZTU1OWQyNDQ5NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.wFnRsTyymEdgt5stn0ME_MfIx6eY1L2IC7hNtsun8o8)
In the
core
folder, the size ofdesignsystem
,ui
, anddatabase
modules are abnormal, for other modules, the size is ok.I am curious if it is expected to use so much storage to save build intermediates for a single module. The size can be easily 'exploded' by adding more modules to the project.
GitHub-hosted free tier runners provide 14G of storage to run actions, the storage limit of the runners is almost the same as the size of the project. If we add one more module, the action will fail and throw a
No space left
error, causing the CI to fail all the time.Relevant logcat output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: