Commit Graph

10 Commits

Author SHA1 Message Date
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00
Jordan Rose
01a0de27ec [test] Update for remote-run-ing tests on a different macOS (#18966)
Most of this is just "remember to specify the inputs and outputs on
the command line, so remote-run can see them". A bit is "prefix
environment variables with '%env-'". And the last few are "yeah,
this was never going to work in a remote environment".

In the few cases where I couldn't think of anything reasonable, I just
marked the test as "UNSUPPORTED: remote_run", a new "feature".
2018-08-27 14:50:40 -07:00
Saleem Abdulrasool
b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00
Joe Groff
80c6671c39 Runtime: Only complain about a deprecated ObjC entry point once.
We only need to alert the user once. rdar://problem/32229417
2017-05-17 12:05:53 -07:00
Joe Groff
c8a7a442ae Runtime: Include source location information in log messages about deprecated implicit Objective-C entry points.
Make it easier for migration by pinpointing exactly where to insert @objc to keep the entry points in Swift 4 mode. rdar://problem/32230003
2017-05-16 19:02:47 -07:00
Doug Gregor
571853dbbb [SE-0160] Emit runtime warnings by default.
Fixes rdar://problem/32229395.
2017-05-16 14:14:44 -07:00
Doug Gregor
d92fe872c5 [SILGen] Only emit Builtin.swift3ImplicitObjCEntrypoint() calls in Swift 4
Only emit calls to Builtin.swift3ImplicitObjCEntrypoint() when we are
in Swift 4 mode with `-enable-swift3-objc-inference`, which is a
transitional state in which one is debugging the use of the
deprecated @objc entrypoints. Fixes rdar://problem/32122408.
2017-05-11 10:23:56 -07:00
Doug Gregor
ca140b7079 [SE-0160] Temporarily restrict test to macOS. 2017-04-03 14:16:11 -07:00
Doug Gregor
5258170037 [SE-0160] Fix executable test to work with the iOS simulator
Provide SIMCTL_CHILD_ environment variables as well, which get passed along to the child of simctl. Additionally, use StdlibUnittest to handle the crash instead of `not —crash`, which doesn’t work through simctl.
2017-03-31 21:53:56 -07:00
Doug Gregor
5b3fe49cd0 [SE-0160] Log uses of @objc thunks emitted due to deprecated @objc inference.
Introduce a new runtime entry point,
`swift_objc_swift3ImplicitObjCEntrypoint`, which is called from any
Objective-C method that was generated due to `@objc` inference rules
that were removed by SE-0160. Aside from being a central place where
users can set a breakpoint to catch when this occurs, this operation
provides logging capabilities that can be enabled by setting the
environment variable SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT:

  SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 (default): do not log
  SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=1: log failed messages
  SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=2: log failed messages with
  backtrace
  SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=3: log failed messages with
  backtrace and abort the process.

The log messages look something like:

    ***Swift runtime: entrypoint -[t.MyClass foo] generated by
       implicit @objc inference is deprecated and will be removed in
       Swift 4
2017-03-31 21:22:16 -07:00