Commit Graph

88 Commits

Author SHA1 Message Date
Pavel Yaskevich
170ccbd36d [Mangling/ABI] NFC: Fix Frontend/APINotes/Index tests to reflect label mangling changes 2017-12-18 15:45:50 -08:00
Christian Bieniak
ec0d53f96f [stdlib] [SR-4005] Allow heterogenous comparisons in elementsEqual (#8045)
* [SR-4005] Allow heterogenous comparisons in elementsEqual

When a user is supplying a predicate to compare the type equivalence
isn’t required

* elementsEqualWithPredicate tests

Compares a string of a number with an integer value by using the
elementsEqualPredicate closure

* Update test expectations to use new sequence element types

* Update hardcoded test to reference sequence
2017-11-29 17:06:38 -08:00
Alex Hoppen
1c7e289b96 [Mangling] Adjust subscript mangling to not include "subscript"
Change the mangling of accessors to have a variable or subscript node
as their only child node, while subscript nodes no longer contain a decl
name.
2017-09-10 19:44:07 +02:00
swift-ci
280753525c Merge remote-tracking branch 'origin/master' into master-next 2017-07-18 12:19:09 -07:00
Xi Ge
a410f20584 swift-api-digester: Avoid considering a type decl is removed if a typealias with the same name is simultaneously added. rdar://33307864 (#11016) 2017-07-18 12:01:32 -07:00
swift-ci
e98182387b Merge remote-tracking branch 'origin/master' into master-next 2017-07-11 12:23:35 -07:00
Xi Ge
2b05e30756 swift-api-digester: don't assume super classes are always present in the module dump.
When we compare the APIs of entire SDKs, we can assume super classes
are always present in the API dump. However, this assumption is invalid
for framework-level API diff checking, where super classes can come from
other modules whose contents are not serialized.

rdar://33110442
2017-07-06 11:49:44 -07:00
Greg Parker
7b009eccde Merge remote-tracking branch 'origin/master' into master-next 2017-06-28 15:25:17 -07:00
Xi Ge
f6e6484437 swift-api-digester: Eliminate false positives introduced by moving a member declaration to super classes.
We shouldn't report these moved declarations as source breaking changes.

rdar://32778228
2017-06-21 19:47:07 -07:00
Xi Ge
87a0cfb910 swift-api-digester: teach the tool to serialize/deserialize super class Usrs. rdar://32778228
This can help us eliminate false positives when we report removed
declarations are actually moved to a newly-introduced super class.
2017-06-21 19:47:07 -07:00
swift-ci
5363f727fc Merge remote-tracking branch 'origin/master' into master-next 2017-06-12 15:49:03 -07:00
Xi Ge
ce17eae939 swift-api-digester: detected getter/setter function to property updates should be explicit about the new property names instead of inferring them from old function name. 2017-06-12 15:10:41 -07:00
swift-ci
43aa0058ea Merge remote-tracking branch 'origin/master' into master-next 2017-06-04 13:08:36 -07:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
swift-ci
a06391bbbd Merge remote-tracking branch 'origin/master' into master-next 2017-05-31 12:28:35 -07:00
Xi Ge
824aaa11e2 swift-api-digester: detect the move of static members only.
This patch restricts the detection of moved members to be static members,
since only in this case we need to update qualified access to
them. The move of instance members will be either handled by rename or
we don't need to update anything at all.

Additionally, this patch introduces a sub-kind of type member diff item
called qualified replacement to describe the aforementioned case. However,
the migrator part has not started to honor this sub-kind yet.

rdar://32466196
2017-05-31 11:47:27 -07:00
swift-ci
383592c33d Merge remote-tracking branch 'origin/master' into master-next 2017-05-30 14:28:39 -07:00
Xi Ge
d1b0e67620 swift-api-digester: teach the tool do detect APINotes' moving one member variable/method to another type. (#9985)
Different from type hoist that moves global variables to static member
variables, we've also seen member variables being moved among different
types via apinotes. Swift-api-digester should be able to detect such
case so that migrator can handle them properly.

rdar://32466196
2017-05-30 14:23:32 -07:00
swift-ci
3f3f9f6563 Merge remote-tracking branch 'origin/master' into master-next 2017-05-03 14:08:58 -07:00
Nate Cook
2e2e4d9bda Revert "Revert "[stdlib] Dictionary/Set enhancements""
This reverts commit 328ebe8567.
2017-05-01 16:06:14 -05:00
swift-ci
6b0ec0e8f6 Merge remote-tracking branch 'origin/master' into master-next 2017-04-29 07:15:25 -07:00
Arnold Schwaighofer
328ebe8567 Revert "[stdlib] Dictionary/Set enhancements" 2017-04-29 07:02:57 -07:00
swift-ci
6465a90a2b Merge remote-tracking branch 'origin/master' into master-next 2017-04-28 19:48:32 -07:00
Nate Cook
e2328885c1 [stdlib] Dictionary/Set enhancements
A variety of enhancements from SE-154 and SE-165:

- Custom Keys and Values collections for Dictionary
- Two sequence-based Dictionary initializers
- Merging methods for Dictionary
- Capacity checking and reserving for Dictionary and Set
- Type-specific filter(_:) methods for Dictionary and Set
- A mapValues(_:) method for Dictionary
- A grouping Dictionary initializer
2017-04-26 11:21:16 -05:00
swift-ci
5c54b21b06 Merge remote-tracking branch 'origin/master' into master-next 2017-04-21 15:28:32 -07:00
Xi Ge
72e7f9a7d7 [test] Add some tests for swift-api-digester's data generation for complex type changes. (#8917) 2017-04-21 15:15:45 -07:00
swift-ci
019d53d07a Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 18:48:30 -07:00
Xi Ge
a644ab33a0 swift-api-digester: fix recently found false positives. (#8899)
* swift-api-digester: ensure constructors are detected as removed if not moved. rdar://31694119

* swift-api-digester: types with the same printed name are considered behavior-preserving. rdar://31694085

* [test] Using tmp directory from build.
2017-04-20 18:34:52 -07:00
swift-ci
34f3319946 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 12:48:38 -07:00
Xi Ge
b089bab40e swift-api-digester: avoid reporting moved constructors. rdar://31694119 (#8885)
They don't make more sense than renamed decls.
2017-04-20 12:48:17 -07:00
swift-ci
b733669ef5 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 01:08:30 -07:00
Doug Gregor
29a15ce402 [Stdlib] Apply SE-0142 to fix ABI FIXME #92, part of ABI FIXME #99. 2017-04-19 23:15:33 -07:00
swift-ci
b56ee3d799 Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 16:48:32 -07:00
Max Moiseev
8ca814cc8c Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-04-17 14:40:20 -07:00
swift-ci
2c5c7d573e Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 13:08:41 -07:00
Xi Ge
ba33fd6236 swift-api-digester: Add a data structure APIDiffItemStore. (#8794)
This structure serves multiple purposes:
	a. Allow migrator to speak in the same language with swift-api-digester in terms of API changes.
	b. Serialize/Deserialize detected API change items in JSON format.
	c. Manage memory after deserializing API change items.
	d. Facilitate look up by USRs of APIs under migration.
The structure is tested by round-trip serialization and deserialization.
2017-04-17 13:04:02 -07:00
Max Moiseev
9b53efd72c Merge branch 'master' into new-integer-protocols 2017-04-17 09:53:44 -07:00
swift-ci
8be8d2cd8d Merge remote-tracking branch 'origin/master' into master-next 2017-04-16 09:48:32 -07:00
Maxim Moiseev
dd2ad785cd Removing the tmp folder even when api-stability test fails (#8785) 2017-04-16 09:40:25 -07:00
Max Moiseev
40184728e5 Listing expected source stability exceptions 2017-04-14 17:40:14 -07:00
swift-ci
a12feb83ac Merge remote-tracking branch 'origin/master' into master-next 2017-04-13 15:08:45 -07:00
Xi Ge
8b26dd000f swift-api-digester: Various improvements for migrator script generation. (#8745)
* swift-api-digester: Add a test for generating migrator script.

* swift-api-digester: Add #ifndef guard before each macro category.

* swift-api-digester: Avoid printing macro categories with empty content.

* swift-api-digester: Add test for multiple type changes in a single decl.

* swift-api-digester: simplify some code. NFC
2017-04-13 15:02:04 -07:00
swift-ci
d484795ba3 Merge remote-tracking branch 'origin/master' into master-next 2017-04-11 18:08:30 -07:00
Dave Abrahams
1f7ec57b04 Merge pull request #1527 from codestergit/master
[Stdlib] Improves Collection.sort  to accept throwing closure
2017-04-11 18:03:17 -07:00
swift-ci
80a6ad1920 Merge remote-tracking branch 'origin/master' into master-next 2017-04-10 14:08:30 -07:00
Xi Ge
7ccef06aa8 Swift-api-digester: check self-parameter explicitly instead of using its context. NFC (#8660) 2017-04-10 13:53:48 -07:00
Bob Wilson
7b75291625 Fix Swift lit tests after LLVM r299775
LLVM's lit implementation switched to use process pools in r299775.
This exposed some pickling problems in Swift's lit files. For a function
or class to be pickle-able, it has to be in the top-level of a real
Python module.

* The SwiftTest lit format class was embedded in the lit.cfg file, so
I moved it out to a separate Python file.

* The inferSwiftBinary function was being stashed in the
config.inferSwiftBinary field and later used to find tools for SourceKit
testing. I moved the config settings for those tools into the top-level
lit.cfg file. I expect this will cause warnings about them not existing
in some cases, but that should be fairly harmless. Maybe someone can
come up with a better solution later.

* The config.substitutions for SourceKit's lit.local.cfg was storing a
reference to an embedded sed_clean function, which just returned a
constant string. I changed the function to be a string, using Python's
raw string feature to avoid the problems that likely led to it being a
function in the first place. (Just guessing.)
2017-04-10 11:07:42 -07:00
codestergit
aa9e9edc8a [Stdlib] Improves sort and sorted to accept throwing clousre
This commit resolves https://bugs.swift.org/browse/SR-715
2017-04-03 16:59:02 +05:30
Roman Levenstein
2c811b82a1 Adjust some tests to pass in non-resilient and resilient modes. 2017-03-16 19:46:11 -07:00
Xi Ge
f4e478e93f swift-api-digester: use 0-based parameter index. rdar://30763215 2017-03-02 16:48:19 -08:00