Skip to content

Bring Data in SCLF into sync with the version in the overlay #1494

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 1 commit into from
Apr 11, 2018

Conversation

saiHemak
Copy link
Contributor

No description provided.

@ianpartridge
Copy link
Contributor

@swift-ci please test

@ianpartridge
Copy link
Contributor

CC: @phausler

@alblue
Copy link
Contributor

alblue commented Mar 29, 2018

Typo in commit message (alining -> aligning) if you can amend the commit message.

@@ -1553,7 +1558,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
/// - parameter buffer: The replacement bytes.
@inline(__always)
public mutating func replaceSubrange<SourceType>(_ subrange: Range<Index>, with buffer: UnsafeBufferPointer<SourceType>) {
guard !buffer.isEmpty else { return }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don’t revert the changes in #1485.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saiHemak what happened here? I thought you were taking the latest version of Data from the overlay?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible we need to do a bidirectional merge here.

@saiHemak
Copy link
Contributor Author

@ianpartridge I corrected it ..
@parkera Please review

@ianpartridge
Copy link
Contributor

@swift-ci please test

@@ -1003,7 +1008,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl

public typealias Index = Int
// FIXME: switch back to Range once swift 5.0 branch has PR #13342
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this could/should be removed as well.

@saiHemak saiHemak force-pushed the data-changes branch 2 times, most recently from e02fb53 to d3443d5 Compare April 3, 2018 06:41
@millenomi
Copy link
Contributor

@swift-ci please test

@millenomi
Copy link
Contributor

cc @phausler

@ianpartridge
Copy link
Contributor

Can we get a review from someone appropriate - @phausler @parkera ?

@parkera
Copy link
Contributor

parkera commented Apr 10, 2018

@saiHemak this is just copied from the overlay, no additional changes?

@saiHemak
Copy link
Contributor Author

@parkera Yeah ,I have not done any additional changes

Copy link
Contributor

@ianpartridge ianpartridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've identified one area that's not correct, there may be others too.

Also, there is a new commit swiftlang/swift@302d827 that needs incorporating.

@@ -1474,7 +1478,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
/// - parameter buffer: The buffer of bytes to append. The size is calculated from `SourceType` and `buffer.count`.
@inline(__always)
public mutating func append<SourceType>(_ buffer : UnsafeBufferPointer<SourceType>) {
if buffer.isEmpty { return }
if buffer.count == 0 { return }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because swiftlang/swift#15674 😉

Copy link
Contributor Author

@saiHemak saiHemak Apr 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) ..Yeah anyway rebasing based on latest master

Copy link
Contributor

@ianpartridge ianpartridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, on line 41 there is a __NSDataIsCompact() function that has been removed from the overlay. It needs removing here too.

The overlay should be treated as the "master" version as that currently gets more frequent bugfixes.

@saiHemak
Copy link
Contributor Author

saiHemak commented Apr 11, 2018

Looks, @ianpartridge ikesyo's changes were brought in to Swift Overlay recently. Initially the overlay had count changes .Hence ,initially when the PR was raised the latest master of Overlay had Count changes which caused the confusion.

@saiHemak
Copy link
Contributor Author

saiHemak commented Apr 11, 2018

@ianpartridge a day ago some more changes were added to Data.swift am picking up those too ..

@ianpartridge
Copy link
Contributor

@swift-ci please test

Copy link
Contributor

@ianpartridge ianpartridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now - thanks!

@ianpartridge
Copy link
Contributor

@parkera looks good to me, your or @phausler 's OK would be welcome.

Copy link
Contributor

@parkera parkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ianpartridge ianpartridge merged commit c12f650 into swiftlang:master Apr 11, 2018
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.

6 participants