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

Fail fast when a dependency replacement handler throws an unhandled exception #49

Merged

Conversation

shartte
Copy link
Contributor

@shartte shartte commented Nov 12, 2023

The symptom I was trying to track down was all Minecraft classes suddenly no longer being found, but no build errors being logged during the build.
It turns out this was due to the Neoform "unpacked" directory being locked by Visual Studio Code on my system (so, unrelated to Neogradle).

To make this way easier to debug for users of NeoGradle, I suggest making unhandled exceptions by dependency replacement handlers a fatal error via this PR.

This leads to a much nicer and easier to parse error message, instead of seemingly random compile errors:

A problem occurred evaluating root project 'Forge'.
Uncaught exception while processing replacement of dependency net.neoforged:neoforge using handler net.neoforged.gradle.common.extensions.dependency.replacement.DependencyReplacementHandlerImpl_Decorated@7a1ff96f: Cloud not clean up target directory: C:\AE2\Forge\build\neoForm\neoFormJoined1.20.2-20231019.002635\unpacked

@sciwhiz12 sciwhiz12 added the enhancement New feature or request label Nov 12, 2023
@marchermans marchermans merged commit 3a63bef into neoforged:NG_7.0 Nov 19, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants