Skip to content

Upstream lib/Migrator to Open Source #10260

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

Merged
merged 34 commits into from
Jun 15, 2017
Merged

Upstream lib/Migrator to Open Source #10260

merged 34 commits into from
Jun 15, 2017

Conversation

bitjammer
Copy link
Contributor

A collection of patches to upstream all lib/Migrator functionality to open source.

nkcsgexi and others added 30 commits June 14, 2017 14:21
After both the syntactic and fix-it passes have run, perform
a diff of the start and end states' texts and output the remap
file.

rdar://problem/30926019
- Don't include inserts in the offset calculation
- Fix colon placement when printing JSON
- Consolidate adjacent insert/removal pairs into a single replacement,
  as this is what the remap applier expects.

rdar://problem/31872288
Xcode has some interesting behavior w.r.t. standalone removal
entries. In the previous migrator, there was an adjustment for
that, so port that over.

rdar://problem/31976029
Resolves rdar://problem/31977848.
… picked up by the differ

Also add tests covering these API changes. Changes that the migrator doesn't currently support are commented out.
This was added in the AppKit overlay as a part of general
AppKit API improvements for Swift 4.

rdar://problem/32178777
Add a requires line to the test as such.

rdar://problem/32235754
The clang::RewriteBuffer can do weird things when seeing multiple
replacements where the replacement text is one character longer or
one character shorter than the range it is replacing.

rdar://problem/32234525
This code is too clever to survive and is causing crashes in the
migrator. It doesn't appear to be providing a noticeable performance
benefit, so disable line-level diffing and just do a fine-grained
diff throughout.

rdar://problem/32281108
Build fix - the reference to Float80 is failing on iOS bots because
the declaration is guarded by an #if.

rdar://problem/32317183
Setting up an invocation adds -aarch64-use-tbi if the target is for
AArch64. In the fix-it passes, we inherit the frontend options which
already has it from the driver passing it down to the frontend.

rdar://problem/32284152
Attempt to fix rdar://problem/32470725
…sent empty argument label instead of using "_". (#9988)
We already had this functionality in the FixitApplyDiagnosticConsumer,
but we also need it in the AST passes because different entries in the
API diff data may drive identical fix-its, namely a general type rename,
which can occur anywhere a DeclRef appears, but also for function overrides'
parameter type changes, which are context specific.

rdar://problem/32431533
These protocol methods were hard-obsoleted in Swift 4.

rdar://problem/32437759
nkcsgexi and others added 4 commits June 14, 2017 14:21
…ow include moved static members. rdar://32466196
If a file is run through the migration workflow a second or third time,
but fails to compile in its current state in Swift 4, it might be possible
for the previous remap file to get picked up, resulting in the old changes
getting applied twice or at the wrong offsets. At the start of the migration,
proactively remove the remap file to prevent this.

rdar://problem/32545844
The migrator pass that converts single-argument function input types
doesn't handle the case when the function input has a label and is
therefore a tuple. Expand it to handle that possibility.

rdar://problem/32477319
@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@bitjammer
Copy link
Contributor Author

Linux failure is sporadic. For OS X, looks like the SDKs aren't updated on the open source bots right now, so I'll xfail the test.

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@bitjammer
Copy link
Contributor Author

Ah, Mishal is updating things now, so I'll hold off and run the tests again once it's done.

@bitjammer bitjammer merged commit aaa7cfa into swiftlang:master Jun 15, 2017
@bitjammer bitjammer deleted the upstream-migrator branch June 15, 2017 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants