Repository navigation
ADFA-7115: Compile Java test sources in their own scope #2254
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
Changes from all commits
9628ef7
be2cbb5
3e1760f
8b39c5d
e3689b4
b91a804
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ class AddImportAction : BaseJavaCodeAction() { | |
| return@withContext ImportCandidates.None(simpleName) | ||
| } | ||
|
|
||
| val compiler = JavaCompilerProvider.get(module) | ||
| val compiler = JavaCompilerProvider.get(module, data.requireFile()) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MINOR: The defect is in If Verify |
||
| val importingPackage = StringSearch.packageName(nioPath) | ||
| val candidates = compiler.findImportableQualifiedNames(simpleName, importingPackage) | ||
|
|
||
|
|
@@ -159,7 +159,7 @@ class AddImportAction : BaseJavaCodeAction() { | |
| } | ||
|
|
||
| val client = data.getLanguageClient() ?: return | ||
| val compiler = JavaCompilerProvider.get(module) | ||
| val compiler = JavaCompilerProvider.get(module, data.requireFile()) | ||
| val actions = mutableListOf<CodeActionItem>() | ||
|
|
||
| for (index in result.rewrites.indices) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MINOR:
invalidateTestScopesmarks only the edited file's own module, but test scopes also read other modules' sources throughgetTestCompileSourceDirectories.With
testImplementation(project(":lib")), editingLib.javaresolves to:lib, so:app's cached unit-test compile is reused and diagnostics inFooTestshow the oldLibAPI untilFooTestchanges. Not a regression: main compilers reading dependency modules already have this gap.Invalidate every compiler whose source path includes the edited module, or list it under Limitations.