Commit Graph

30 Commits

Author SHA1 Message Date
Kavon Farvardin
0420310623 NCGenerics: it's no longer "experimental"
resolves rdar://127701059
2024-05-08 10:49:12 -07:00
Kavon Farvardin
554fa49a1f Test: clean-up noncopyable_generics lit usage
There no longer is a lit feature called `noncopyable_generics`, it's
just always on now.
2024-04-01 12:28:08 -07:00
Kavon Farvardin
3b02f306ee APIDigester: Stringify inverses in GenericSigs
The presence of Copyable/Escapable conformances doesn't affect ABI. Only
their absence in terms of suppressed requirements like `~Copyable` need
to be output for diffing by the APIDigester.
2024-03-14 23:10:44 -07:00
Kavon Farvardin
f296d8e158 NCGenerics: mass XFAIL tests
It's easier to get a handle on regressions while working through
failures if the tests that are known to not pass are XFAIL'd for
NoncopyableGenerics.
2024-02-20 18:26:05 -05:00
Doug Gregor
72f1beab28 [Test] Downscope api-digester generalization to all *Apple* platforms 2020-05-01 15:58:46 -07:00
Doug Gregor
f1fcec14f4 [Test] Generalize api-digester tests to all platforms.
The API digester tests were being run only for macOS, mainly
because they were not using %target-swift consistently. Lift
the unnecessary restriction so we run these tests more widely.
2020-05-01 14:56:01 -07:00
Harlan Haskins
4d731735d2 [api-digester] Teach the api-digester about hasMissingDesignatedInitializers
Because we won’t be serializing this attribute, add custom diagnostics for the cases where:

- We add @_hasMissingDesignatedInits to an open class, which means subclasses won’t be able to inherit its inits
- We remove @_inheritsConvenienceInitializers, which means APIs are removed
2020-01-06 10:15:07 -08:00
Xi Ge
d8b611d060 ABI/API checker: teach the tool to diagnose against a builtin empty baseline
Framework authors may be interested in comparing the current framework build
against an empty baseline to find public APIs without @available attributes. This
change makes such exercise easier.
2019-09-04 11:07:39 -07:00
Xi Ge
2160f65283 [SR-10972] swift-api-digester: avoid diagnosing the removal of __derived_enum_equals and __derived_struct_equals
These functions are compiler implementation details and diagnosing
them is redundant and may be confusing to framework authors.
2019-06-20 16:14:43 -07:00
Xi Ge
d405fcd8ec swift-api-digester: teach the tool to directly compare two module interfaces
We used to use a Json format to capture the ABI/API detail of Swift modules to
walk-around module compatibility issues across different compiler versions. Since
Swift module now is in stable format, we can compare two swiftinterface files
directly without dumping the content into Json format.
2019-06-12 11:16:23 -07:00
Xi Ge
f7406e6c3c swift-api-digester: diagnose changing of the necessity of new witness table entry as ABI breakage
Protocol requirements may not necessarily add new entries to the witness table if
it's inherited from super protocol. This patch teaches the json dump to
include a flag indicating whether a protocol requirement requires new
witness table entry and diagnoses the change of such flag as ABI
breakages.

rdar://47657204
2019-04-01 20:29:44 -07:00
Jordan Rose
42522ca4ae [ParseableInterface] Module-qualify protocol types too
Otherwise we can get in trouble when a local type is named, say,
'Sequence'.

Also contains test updates and a fix for Harlan's previous commit,
which actually affects all typealiases, not just those in the Builtin
module.
2019-03-29 08:52:22 -07:00
Slava Pestov
1159af50d9 Rename -enable-resilience to -enable-library-evolution and make it a driver flag
Fixes <rdar://problem/47679085>.
2019-03-14 22:24:26 -04:00
Xi Ge
70118d4db0 swift-module-digester: output ABI/API diagnostics to a path instead of stdout.
This is handy for scripts.
2018-10-15 19:12:34 -07:00
Xi Ge
0afafd1ca4 swift-module-digester: diagnose let to var changes and vice versa as ABI breaking. 2018-09-27 14:25:46 -07:00
Xi Ge
fda107cbaf [test] swift-module-digester: pre-processing diagnostics results before comparing them.
This allows us to add comments to the error messages without breaking the tests.
2018-09-18 12:03:48 -07:00
Jordan Rose
673874db3f [Serialization] Don't serialize invalid attributes
This isn't just an optimization; we weren't recording that the
attribute was invalid, and so it was getting /treated as valid/ when
the module was imported into a client later.

This would have caught the issue fixed by the previous commit.
2018-08-22 15:29:31 -07:00
Xi Ge
17b9a4edf9 swift-api-digester: diagnose the addition and removal of @objc, @_fixed_layout and @_frozen under ABI mode. 2018-08-15 17:49:01 -07:00
Robert Widmann
e3118f1e2a Miscellaneous test migrations 2018-06-27 13:31:22 -07:00
Xi Ge
20a48e5adb swift-api-digester: teach the tool to serialize USRs for nominal type. (#15463)
This allows us to map back from a type to the declaration in the dump,
so that we can perform more fine-grained analysis like whether a string
has been changed to string enum.
2018-03-23 16:29:54 -07:00
Xi Ge
cd3b34c7cf swift-api-digester: for each source-breaking item, we should output its framework name to help screening. rdar://35421724 (#14068)
The framework name is behind a flag "print-module". We should
print them during whole-sdk checks however not in the per-framework diffing
tool.
2018-01-22 15:44:26 -08: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
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
Xi Ge
583da52348 swift-api-digester: re-enable swift-api-digester tests after fixing a release-only failure. rdar://29591753 (#6276) 2016-12-14 17:00:24 -08:00
Xi Ge
d3b5dfa8d9 Revert "swift-api-digester: initialize vector with a reasonable capacity." (#6184)
This did not resolve the test failure.
2016-12-09 18:39:29 -08:00
Xi Ge
e6dcd443eb swift-api-digester: initialize vector with a reasonable capacity.
In Jenkins bot, we've seen "exception std::length_error: vector" for
api-digester tests. Tentatively, this patch initializes a major vector with a
reasonably large size, which may avoid its wild capacity growth.
2016-12-09 16:45:18 -08:00
Xi Ge
73bd3526ca [test] Disable failing api-digester test while investigating. (#6166) 2016-12-09 11:15:56 -08:00
Michael Ilseman
0cb2188ebd [Swift version] Fix up test cases 2016-10-18 15:02:49 -07:00
Xi Ge
647f65ea21 swift-api-digester: teach the tool to output constructors' parameter type changes. (#5351) 2016-10-18 13:03:21 -07:00
Xi Ge
edea59722e api-digester: teach the tool to detect new mutating/throwing functions (#5284) 2016-10-13 21:04:39 -07:00