-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CodeCompletion] Batch code completion test #28946
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
[CodeCompletion] Batch code completion test #28946
Conversation
78a60c1
to
d3d2a31
Compare
d3d2a31
to
d69cc9b
Compare
d69cc9b
to
4b617e7
Compare
4b617e7
to
524342d
Compare
} | ||
|
||
func testTypeInTupleType7() { | ||
var localVar: (a: b: #^TYPE_IN_TUPLE_TYPE_7^# | ||
var localVar: (a: b: #^TYPE_IN_TUPLE_TYPE_7?skip=FIXME^# |
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.
This was not checked. i.e. no RUN:
line was there.
extension Task.Inner.#^UNBOUND_DOT^# {} | ||
func testUnbound(x: Task.Inner.#^UNBOUND_DOT^#) {} | ||
extension Task.Inner.#^UNBOUND_DOT_1?check=UNBOUND_DOT^# {} | ||
func testUnbound(x: Task.Inner.#^UNBOUND_DOT_2?check=UNBOUND_DOT^#) {} |
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.
UNBOUND_DOT
used to be duplicated.
@swift-ci Please smoke test |
524342d
to
4f9202b
Compare
@swift-ci Please smoke test |
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.
Really happy you're working on this. It will make a huge difference in test performance once we port all the big tests.
llvm::errs() << "Elapsed: " << elapsed.count() << " msec\n"; | ||
OS.flush(); | ||
|
||
if (OutputDir.empty()) { |
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.
I was surprised that empty output dir implies skipping filecheck. Should we make it an error to have no output dir unless you also have --dont-filecheck ?
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.
Not specifying '-completion-output-dir' is now error unless -skip-filecheck
Utilize fast-completion in swift-ide-test
4f9202b
to
f99fa56
Compare
@swift-ci Please smoke test |
Utilize fast completion (reusing
CompilerInstance
) in libIDE code completion tests.complete_types.swift
)Introduce
-batch-code-completion
mode. The typical usage is:This scans the source file for tokens (
#^NAME^#
), then performs code completion for each token in random order withreuseastcontext
mode.Options are:
-filecheck
:FileCheck
command path. Completion results are checked with thisFileCheck
-completion-output-dir
: Temporary file directory. Completion results are output with${output dir}/complete-${token name}.result
-random-seed
: By default, tokens are shuffled with random generated seed. Using-random-seed
you can specify shuffle seed. This is convenient for reproducing order-dependent failures-code-completion-token
: You can specify a specific token name to test, but inbatch-code-completion
modeEach token can have several options (e.g.
#^NAME?check=GLOBAL;comments=true^#
):check
: By default, the completion results areFileCheck -check-prefixes=
ed with the token name.check
can changes thecheck-prefix
name. Also, you can specify multiplecheck
to perform multipleFileCheck
s with different prefixeskeywords
: equivalent to-code-completion-keywords
comments
: equivalent to-code-completion-comments
skip
: Tokens withskip
are skippedIn this PR. Only migrate
test/IDE/complete_type.swift
. But I intend to migrate other test files in follow up PRs.rdar://problem/16025703