Merge pull request #6716 from eed3si9n/wip/global-keys

Fixes tab completion of global keys
This commit is contained in:
eugene yokota 2021-11-16 19:51:58 -05:00 committed by GitHub
commit aa22c02d84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -304,7 +304,12 @@ object Act {
case Some(ProjectRef(uri, _)) => index.keys(Some(BuildRef(uri)), conf, task) case Some(ProjectRef(uri, _)) => index.keys(Some(BuildRef(uri)), conf, task)
case _ => Set() case _ => Set()
} }
val keys: Set[String] = index.keys(proj, conf, task) ++ buildKeys val globalKeys: Set[String] =
proj match {
case Some(_) => index.keys(None, conf, task)
case _ => Set()
}
val keys: Set[String] = index.keys(proj, conf, task) ++ buildKeys ++ globalKeys
keyParser(keys) keyParser(keys)
} }

View File

@ -118,14 +118,16 @@ object ClientTest extends AbstractServerTest {
"compileIncSetup", "compileIncSetup",
"compileIncremental", "compileIncremental",
"compileJava", "compileJava",
"compileOrder",
"compileOutputs", "compileOutputs",
"compileProgress", "compileProgress",
"compileScalaBackend", "compileScalaBackend",
"compileSplit", "compileSplit",
"compilerCache",
"compilers", "compilers",
) )
assert(complete("compi") == expected) assert(complete("compi").toVector == expected)
} }
test("testOnly completions") { _ => test("testOnly completions") { _ =>
val testOnlyExpected = Vector( val testOnlyExpected = Vector(