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

fix(nx-plugin): reduce memory usage of projectReportAll when using @nx/gradle plugin #29829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JBSchami
Copy link

The project-report Gradle plugin includes 4 tasks [dependencyReport, propertyReport, taskReport, htmlDependencyReport ] but only uses the dependency, propertyReport and taskReport tasks. The htmlDependencyReport is intended for viewing in a browser and is often too large for Nodes default memory settings causing the Nx graph creation to fail. This change disables the task completely for Nxs purposes.

Current Behavior

The @nx/gradle plugin template includes the project-report Gradle plugin, including the htmlDependencyReport task, which it does not require to compute the Graph but which consumes lots of memory in process, resulting in OutOfMemory errors when computing the Graph.

Expected Behavior

Projects to which the @nx/gradle plugin is added will continue to include the project-report gradle plugin but disable the htmlDependencyReport task to reduce the risk of this issue.

Related Issue(s)

#27750

Fixes #27750

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 3:35pm

Copy link

nx-cloud bot commented Jan 31, 2025

View your CI Pipeline Execution ↗ for commit 843e113.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 15m 28s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 51s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base=7d864... ✅ Succeeded 23s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 22s View ↗
nx documentation --no-dte ✅ Succeeded 37s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-31 15:53:48 UTC

The project-report Gradle plugin includes 4 tasks [dependencyReport, propertyReport, taskReport, htmlDependencyReport ] but only uses the dependency, propertyReport and taskReport tasks. The htmlDependencyReport is intended for viewing in a browser and is often too large for Nodes default memory settings causing the Nx graph creation to fail. This change disables the task completely for Nxs purposes.
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

Successfully merging this pull request may close these issues.

[Nx Gradle][Plugin] OutOfMemory errors when using @nx/gradle plugin on a complex graph
1 participant