Skip to content

Fix sporadic error with detection of instantiable subtypes#10204

Open
axeluhl wants to merge 21 commits intogwtproject:mainfrom
SAP:issue-10181-clean
Open

Fix sporadic error with detection of instantiable subtypes#10204
axeluhl wants to merge 21 commits intogwtproject:mainfrom
SAP:issue-10181-clean

Conversation

@axeluhl
Copy link
Copy Markdown
Contributor

@axeluhl axeluhl commented Dec 4, 2025

See the issue for discussions.

This PR contains four tests based on two example type graphs that demonstrate the issue and consistently fail when executed with the main version. They all fail consistently because a class that is the only instantiable subtype of an interface has a cycle across its fields' types leading back to the class or the interface it implements.

During checking for instantiable subtypes, the type in question is marked as pending in its TypeInfoComputed (TIC). Then, when the decision isn't final after the checkSubtypes invocation, the TIC is not yet marked as done, and erroneously the TIC is then set to instantiable==false which is incorrect at that time.

The fix leaves a pending subtype pending unless a positive result was found and only updates its TIC regarding any instantiable subtypes. This way, inconsistent decisions about types not being instantiable by the RPC generator can be avoided. Four test cases that fail prior to this fix pass with the fix.

Fixes #10181

axeluhl and others added 20 commits December 2, 2025 16:05
…ass still having a chance of instantiability
stderr has
[ERROR] 'com.google.gwt.user.rebind.rpc.testcases.client.RecursiveTypeGraphInstantiability.StoredDataMiningReportDTO' has no instantiable subtypes
which was the expected result.
Copy link
Copy Markdown
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could you update the title to be about the patch (though still brief), and description to follow the template - including details of "why" the change was made? A trailer at the end can then link to the bug ID, but doesn't require a future reader to go over 50+ comments to understand a standalone patch.

@zbynek zbynek changed the title Fixes #10181 Fix sporadic error with detection of instantiable subtypes Dec 6, 2025
@zbynek
Copy link
Copy Markdown
Collaborator

zbynek commented Dec 6, 2025

@axeluhl the phrase Fixes #10181 needs to be part of a comment for GitHub to link issues to PRs properly. Ideally it should be the last part of the PR's initial comment (a.k.a. PR description). I've updated the titles and initial comments of both your PRs, but for this one it might be useful to make the initial comment more detailed, please edit it to include more information as Colin suggests.

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.

Sporadic [ERROR] '{type-name}' has no instantiable subtypes

3 participants