The Wayback Machine - https://web.archive.org/web/20201125133633/https://github.com/oracle/graal/issues/1715
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

[native-image] When two substitutions are present the error is not helpful #1715

Open
graemerocher opened this issue Oct 2, 2019 · 2 comments
Open

Comments

@graemerocher
Copy link
Member

@graemerocher graemerocher commented Oct 2, 2019

Currently register looks like:

   private static <T> void register(Map<T, T> substitutions, T annotated, T original, T target) {
        if (annotated != null) {
            guarantee(!substitutions.containsKey(annotated) || substitutions.get(annotated) == original || substitutions.get(annotated) == target, "Already registered: %s", annotated);
            substitutions.put(annotated, target);
        }
        ...
    }

The output message only indicates the substitution is already registered but not what is causing the conflict. This means the only way for the user to find out is to attach a debugger and set a breakpoint at this line.

The error message should include more information about the two substitutions that conflict so that the user can potentially take appropriate action to remove one of them.

@cstancu cstancu self-assigned this Oct 2, 2019
@cstancu cstancu added the native-image label Oct 2, 2019
@viktorklang
Copy link

@viktorklang viktorklang commented Apr 15, 2020

Seconded. I'm currently having issues trying to track down which of my dependencies is trying to add a substitution to something which clashes somehow. Headache.

@cstancu
Copy link
Member

@cstancu cstancu commented Sep 25, 2020

This seems like a good candidate for a community contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.