Commit Graph

2145 Commits

Author SHA1 Message Date
swift_jenkins
cf0e66e62a Merge remote-tracking branch 'origin/master' into master-next 2020-04-08 19:59:41 -07:00
Rintaro Ishizaki
a5fa431af4 Merge pull request #30890 from rintaro/sourcekit-test-diff
[SourceKit/Testing] Add %diff as an alias for 'diff --strip-trailing-cr'
2020-04-08 19:44:28 -07:00
Rintaro Ishizaki
aee280ad65 [SourceKit/Testing] Add %diff as an alias for 'diff --strip-trailing-cr' 2020-04-08 11:23:48 -07:00
Nathan Hawes
19d6effc5e [SourceKit/CodeFormat] Column-align multiple patterns in catch clauses.
Catch clauses now support mutliple patterns. Like 'case' patterns, these
should be column-aligned if split across multiple lines.

do {
  ...
} catch MyErr.a(let x),
        MyErr.b(let x) {
  print("hello")
}
2020-04-08 09:46:09 -07:00
swift_jenkins
add82ffe41 Merge remote-tracking branch 'origin/master' into master-next 2020-04-07 17:59:32 -07:00
Rintaro Ishizaki
496c303ab5 Merge pull request #30865 from rintaro/sourcekit-completion-rdar61367416
[SourceKit] Don't use diagnostics to indicate fast-completion
2020-04-07 17:58:19 -07:00
swift_jenkins
b7af9dbf98 Merge remote-tracking branch 'origin/master' into master-next 2020-04-07 17:01:37 -07:00
Rintaro Ishizaki
4870d1c017 [SourceKit] Don't use diagnostics to indicate fast-completion
Add 'key.reusingastcontext: 1' to the response instead.
Using diagnostics can be a noise to indexing log clients.

rdar://problem/61367416
2020-04-07 16:26:00 -07:00
Rintaro Ishizaki
837fa0d250 [CodeCompletion] Use --strip-trailing-cr for diff test 2020-04-07 13:15:41 -07:00
swift_jenkins
6f6153500e Merge remote-tracking branch 'origin/master' into master-next 2020-04-07 11:40:37 -07:00
Rintaro Ishizaki
31e7873704 Merge pull request #30767 from rintaro/sourcekit-completion-annotateddesc-rdar60801189
[SourceKit/CodeCompletion] Add an option to emit annotated description
2020-04-07 11:33:21 -07:00
Rintaro Ishizaki
28de43b7ca [CodeCompletion] Trim whitespaces around the content 2020-04-07 00:50:43 -07:00
Rintaro Ishizaki
773a464e83 [CodeCompletion] Add an option to emit annotated description 2020-04-07 00:46:14 -07:00
swift_jenkins
7fae9830db Merge remote-tracking branch 'origin/master' into master-next 2020-04-06 17:25:45 -07:00
Nathan Hawes
3ebb81e38f Merge pull request #30841 from nathawes/fix-cross-import-doc-support-test
[test] Fix DocSupport test that should have passed -enable-cross-import-overlays
2020-04-06 16:28:29 -07:00
swift_jenkins
49ddc4b2be Merge remote-tracking branch 'origin/master' into master-next 2020-04-06 14:20:36 -07:00
Nathan Hawes
b2fe997e7b Merge pull request #30836 from nathawes/doc-info-where-from-context
[SourceKit/DocSupport] List generic requirements from contextual where clauses in doc info request
2020-04-06 14:04:51 -07:00
Nathan Hawes
6e3f512fd1 [test] Fix DocSupport test that should have passed -enable-cross-import-overlays
Resolves rdar://problem/61346236
2020-04-06 13:57:36 -07:00
Nathan Hawes
af0509e106 [SourceKit/DocSupport] List generic requirements from contextual where clauses in doc info request
We previously didn't report the requirements in the where clause of 'boxes'
below because it didn't have generic parameters of its own:

public struct Box<Wrapped> {
    public func boxes() -> [Box<Wrapped.Element>] where Wrapped: Sequence { fatalError() }
}

Resolves rdar://problem/60658263
2020-04-06 11:43:14 -07:00
swift_jenkins
c2c2dfe986 Merge remote-tracking branch 'origin/master' into master-next 2020-04-06 10:00:13 -07:00
Xi Ge
70d119199c test: disable SourceKit/DocSupport/doc_swift_module_cross_import.swift
rdar://61346236
2020-04-06 09:53:11 -07:00
swift_jenkins
d332dba5ee Merge remote-tracking branch 'origin/master' into master-next 2020-04-04 15:41:56 -07:00
swift-ci
51a2a07be6 Merge pull request #30758 from nathawes/cross-import-fixes 2020-04-04 15:38:27 -07:00
Nathan Hawes
9f6f76308e Add method to ModuleDecl to lazily compute the underlying module for cross-import overlays
Also update code completion, indexing, interface generation and doc info to use it.
2020-04-03 16:04:32 -07:00
swift_jenkins
8945bd060f Merge remote-tracking branch 'origin/master' into master-next 2020-04-02 19:52:14 -07:00
Argyrios Kyrtzidis
f389bcd631 [test/SourceKit] Add a test case for a crash that is already fixed 2020-04-02 17:24:15 -07:00
swift_jenkins
acbf5bf9ae Merge remote-tracking branch 'origin/master' into master-next 2020-03-27 15:42:21 -07:00
Owen Voorhees
791312fb74 Turn Educational Notes On-By-Default (#30583)
* [Diagnostics] Turn educational notes on-by-default

* [Diagnostics] Only include educational notes in printed output if -print-educational-notes is passed

* Make -print-educational-notes a driver option

* [Diagnostics] Issue a printed remark if educational notes are available, but disabled

* [docs] Update educational notes documentation and add a contributing guide

* [Diagnostics] Cleanup PrintingDiagnosticConsumer handling of edu notes

* Revert "[Diagnostics] Issue a printed remark if educational notes are available, but disabled"
For now, don't notify users if edu notes are available but disabled. This decision can be reevaluated later.
2020-03-27 15:29:48 -07:00
swift_jenkins
b1fde1f867 Merge remote-tracking branch 'origin/master' into master-next 2020-03-27 09:40:05 -07:00
Rintaro Ishizaki
49d72d77d1 Merge pull request #30653 from rintaro/sourcekit-completion-optionalsort-rdar60799439
[SourceKit] Add an option to sort completion result
2020-03-27 09:26:56 -07:00
Rintaro Ishizaki
429467288e [SourceKit] Add an option to sort completion result
Defaults to false

rdar://problem/60799439
2020-03-26 17:39:36 -07:00
swift_jenkins
b41ab1e1e2 Merge remote-tracking branch 'origin/master' into master-next 2020-03-26 09:19:36 -07:00
Rintaro Ishizaki
7b7599a28d [CodeCompletion] Don't run second pass for decls in closures
For instance:
--
let globalVar = {
    func something(arg: Int) -> Int {
        #^HERE^#
    }
    return something(12)
}()
--
We want to consider this as a top-level completion, not a function body
completion.

rdar://problem/60838686
2020-03-26 00:42:39 -07:00
swift_jenkins
5aea605e6f Merge remote-tracking branch 'origin/master' into master-next 2020-03-24 17:23:45 -07:00
Rintaro Ishizaki
3841250898 Merge pull request #30515 from rintaro/sourcekit-modulevalidation-rdar59567281
[SourceKit] Save clang module validation time
2020-03-24 17:23:01 -07:00
swift_jenkins
0d739f4325 Merge remote-tracking branch 'origin/master' into master-next 2020-03-24 15:39:45 -07:00
Rintaro Ishizaki
d0d17114b7 [SourceKit] Disable Windows testing for build_session test cases 2020-03-24 15:29:16 -07:00
Rintaro Ishizaki
22f048e637 [SourceKit] Save clang module validation time
Pass '-fbuild-session-timestamp' and '-fmodules-validate-once-per-build-sessio'
to ClangImporter so that module validation happens only once for the
SourceKit lifetime.

rdar://problem/59567281
2020-03-24 13:38:57 -07:00
swift_jenkins
031ef36166 Merge remote-tracking branch 'origin/master' into master-next 2020-03-24 10:37:41 -07:00
Nathan Hawes
fe12ab2067 [SourceKit/DocSupport][test] Test that the synthesized comments generated for cross-import overlay decls are ignored.
Unlike doc comments, they shouldn't be reported in the 'fully_annotated_decl' field.
2020-03-24 10:31:08 -07:00
Nathan Hawes
9aafadd090 [SourceKit/DocSupport] Report the required bystander modules on symbols from cross-import overlays.
Resolves rdar://problem/59446044
2020-03-24 10:31:08 -07:00
Nathan Hawes
a355a56dd4 [SourceKit/InterfaceGen][test] Test that doc comments are printed after the required bystanders comment. 2020-03-23 12:44:08 -07:00
Brent Royal-Gordon
95d98249ce Handle flaky SourceKit/CursorInfo/use-swift-source-info.swift
This test was XFAILed on master-next in https://github.com/apple/swift/pull/30330, but it is now passing again. Change the XFAIL to a failing REQUIRES instead.
2020-03-22 18:04:04 -07:00
Nathan Hawes
a7e1cb3925 [SourceKit] Update cursor info to report symbols from cross-import overlays as coming from the underylying module.
Also refactor some of the interface generation cross-import support code to be
shared.
2020-03-20 21:49:51 -07:00
Nathan Hawes
b3f296d590 [SourceKit/InterfaceGen] Also print the cross-import overlays of a module in its interface.
When printing the generated interface of a module, also print the decls from
any underscored cross-import overlays it is the direct, or indirect underlying
module of. Declarations are grouped by overlay, with a descriptive `MARK:`
comment introducing each overlay, and a regular comment above each decl listing
the required bystander modules that must be imported for the decl to be
available.

In addition in each overlay:
- import declarations of any underlying modules are filtered out, since they
  are either other underscored cross-import overlays, or the target module they
  are being presented as being part of.
- import declarations that are also in the target module are filtered out, since
  the overlay is being presented as a conditional part of the target module.

Resolves rdar://problem/59445385
2020-03-19 18:15:42 -07:00
swift_jenkins
4c43f6a765 Merge remote-tracking branch 'origin/master' into master-next 2020-03-17 20:20:14 -07:00
Argyrios Kyrtzidis
802af8c436 Merge pull request #30459 from akyrtzi/avoid-isSettable-for-syntactic
[SourceKit] Avoid calling `AbstractStorageDecl::isSettable` during syntactic operations
2020-03-17 20:15:57 -07:00
Argyrios Kyrtzidis
b3b3cd3f81 [SourceKit] Avoid calling AbstractStorageDecl::isSettable during syntactic operations
`isSettable` can trigger typechecking and cause crashes during pure syntactic requests.

rdar://60441208
2020-03-17 18:30:33 -07:00
swift_jenkins
5a33746a42 Merge remote-tracking branch 'origin/master' into master-next 2020-03-17 16:58:07 -07:00
Ted Kremenek
39c34c89ee Bump Swift version to 5.3 2020-03-17 13:54:32 -07:00