Skip to content
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

Work around SR-6419 #483

Merged
merged 2 commits into from
Nov 18, 2017
Merged

Work around SR-6419 #483

merged 2 commits into from
Nov 18, 2017

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Nov 17, 2017

self?.observedNotifications.append(n)
})
#else
self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, usingBlock: { [weak self] n in

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 130 characters (line_length)

}
#elseif swift(>=4.0.2) || swift(>=3.2.2)
// A workaround to SR-6419.
self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, using: { [weak self] n in

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)

@ikesyo
Copy link
Member Author

ikesyo commented Nov 17, 2017

@lvsti Could you try with this branch?

// linux-swift gets confused by .append(n)
self?.observedNotifications.append(n)
}
#elseif swift(>=4.0.2) || swift(>=3.2.2)
Copy link
Member Author

@ikesyo ikesyo Nov 17, 2017

Choose a reason for hiding this comment

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

Unfortunately we can't use #if if swift(>=x.y.z) in Swift 3.0 😞

https://travis-ci.org/Quick/Nimble/jobs/303516955

@ikesyo ikesyo force-pushed the SR-6419-workaround branch 4 times, most recently from 1db6bc4 to 7550e7e Compare November 17, 2017 14:46
@Quick Quick deleted a comment from houndci-bot Nov 17, 2017
@Quick Quick deleted a comment from houndci-bot Nov 17, 2017
@Quick Quick deleted a comment from houndci-bot Nov 17, 2017
@Quick Quick deleted a comment from houndci-bot Nov 17, 2017
@lvsti
Copy link

lvsti commented Nov 17, 2017

it ran without errors: https://travis-ci.org/lvsti/MockSix/jobs/303702207 👍

@ikesyo ikesyo merged commit 1b135a5 into master Nov 18, 2017
@ikesyo ikesyo deleted the SR-6419-workaround branch November 18, 2017 00:40
Megal pushed a commit to Megal/Nimble that referenced this pull request Jul 31, 2019
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.

Compilation error on Linux
3 participants