-
Notifications
You must be signed in to change notification settings - Fork 134
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
OPTION_JdtDebugCompileMode has surprising effects on imports #445
Comments
@stephan-herrmann, honestly speaking I can't remember details why which line was changed. That was done to fix evaluation in debugger, so once that was "fixed" (one way or another) we were happy. But in light of #424 changes, shouldn't debugger use this new preference instead? We don't need to have two workarounds for same problem. |
For
Since we are fixing one specific bug with the change, I guess we can partially revert the change - as long as the debugger works as expected. Or better, as Andrey already mentioned, maybe we should replace the change with changes from #424 . Though I've not looked into the PR/issue in detail. I guess we could go with suggestion |
#424 has been merged a while ago. Has anyone started to work on reconciling both changes? |
Using the new option seems to make the test happy (tested also with no option at all, the test fails as expected), so I've set: eclipse-jdt/eclipse.jdt.debug#261 After we merge that, we can proceed with reverting changes for https://bugs.eclipse.org/bugs/show_bug.cgi?id=543604 (aside from added test). |
Unfortunately this change caused regression in debugger, see eclipse-jdt/eclipse.jdt.debug#309 |
Did we fix the bug just for user code that is not in a module? I wonder if we should try to avoid the |
fixes eclipse-jdt#445 Revisiting the 3 changes in faultInImports() from Bug 543604: + the check during resolution of on-demand imports remains, it is good + the second change was wrong, moved into findImport() this avoids answering a SplitPackageBinding (for conflict reporting) where in fact a type is being imported + the third change is being pulled up, because the whole purpose of that block is to detect package conflicts, which we are not interested in.
fixes #445 Revisiting the 3 changes in faultInImports() from Bug 543604: + the check during resolution of on-demand imports remains, it is good + the second change was wrong, moved into findImport() this avoids answering a SplitPackageBinding (for conflict reporting) where in fact a type is being imported + the third change is being pulled up, because the whole purpose of that block is to detect package conflicts, which we are not interested in.
…-jdt#2340) fixes eclipse-jdt#445 Revisiting the 3 changes in faultInImports() from Bug 543604: + the check during resolution of on-demand imports remains, it is good + the second change was wrong, moved into findImport() this avoids answering a SplitPackageBinding (for conflict reporting) where in fact a type is being imported + the third change is being pulled up, because the whole purpose of that block is to detect package conflicts, which we are not interested in.
…-jdt#2340) fixes eclipse-jdt#445 Revisiting the 3 changes in faultInImports() from Bug 543604: + the check during resolution of on-demand imports remains, it is good + the second change was wrong, moved into findImport() this avoids answering a SplitPackageBinding (for conflict reporting) where in fact a type is being imported + the third change is being pulled up, because the whole purpose of that block is to detect package conflicts, which we are not interested in.
In https://bugs.eclipse.org/543604 the
OPTION_JdtDebugCompileMode
was introduced to suppress a specific error when compiling for debug evaluations. Fine. The option is respected in various locations of the code, but only one of them is covered by a test.While reviewing PR #424 I detected a strange interaction: if you run the test from the PR, but without using its new
OPTION_IgnoreUnnamedModuleForSplitPackage
, you will see this error:Fine, that's what #424 is all about. BUT if you now enable
OPTION_JdtDebugCompileMode
that error message is changed toThis indicates that the code change from https://bugs.eclipse.org/543604 within
CompilationUnitScope.faultInImports()
doesn't work as expected.@trancexpress @iloveeclipse could you shed a light on why those changes in
faultInImports()
were made? Should we ...OPTION_JdtDebugCompileMode
toQualifiedTypeReference.getTypeBinding(Scope)
, orBonus question: what about the changes in
ModuleDeclaration.analyseOneDependency(..)
?The text was updated successfully, but these errors were encountered: