{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/2047","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/2047/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/2047/comments","events_url":"https://api.github.com/repos/apple/swift/issues/2047/events","html_url":"https://github.com/apple/swift/pull/2047","id":145587010,"number":2047,"title":"[SE-0046] Implementation for consistent func labels","user":{"login":"manavgabhawala","id":8603246,"avatar_url":"https://avatars.githubusercontent.com/u/8603246?v=3","gravatar_id":"","url":"https://api.github.com/users/manavgabhawala","html_url":"https://github.com/manavgabhawala","followers_url":"https://api.github.com/users/manavgabhawala/followers","following_url":"https://api.github.com/users/manavgabhawala/following{/other_user}","gists_url":"https://api.github.com/users/manavgabhawala/gists{/gist_id}","starred_url":"https://api.github.com/users/manavgabhawala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manavgabhawala/subscriptions","organizations_url":"https://api.github.com/users/manavgabhawala/orgs","repos_url":"https://api.github.com/users/manavgabhawala/repos","events_url":"https://api.github.com/users/manavgabhawala/events{/privacy}","received_events_url":"https://api.github.com/users/manavgabhawala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-04T05:15:09Z","updated_at":"2016-04-04T17:53:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/2047","html_url":"https://github.com/apple/swift/pull/2047","diff_url":"https://github.com/apple/swift/pull/2047.diff","patch_url":"https://github.com/apple/swift/pull/2047.patch"},"body":"#### What's in this pull request?\r\nImplements [SE-0046](https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md) to provide consistent function labels (i.e. the first parameter no longer has special behavior for function labels). \r\n\r\nI separated out the changes into separate commits depending on the part being changed so that its easier to review since this is a massive change across the entire repo. However, if it is preferred that this is merged as a single commit, I would be happy to squash into one commit.\r\n\r\nI updated most of the swift code using Regex find and replace (and then manual verification where necessary) and since a lot of other repos are going to suffer source code breaking changes to make it easier for them, here are the regex strings I used:\r\nFor regular (non-generic) functions I did a search for  `func ([_a-zA-Z0-9]+?)(\\s*?)\\((\\s*?)([a-zA-Z0-9]+?)(\\s*?):` and replaced with `func \\1\\2(\\3_ \\4\\5:` By estimation this worked about 95% of the time and almost never found any false positives.\r\nFor generic functions I did a second search using: `func ([_a-zA-Z0-9]+?)(\\s*?)(<[\\s\\S]*?>)(\\s*?)\\((\\s*?)([a-zA-Z0-9]+?)(\\s*?):` and replaced with `func \\1\\2\\3\\4(\\5_ \\6\\7:` This worked about 90% of the time but be warned it does tend to find false positives (rarely).\r\n\r\n#### Resolved bug number:\r\n- [SR-961](https://bugs.swift.org/browse/SR-961)\r\n- rdar://problem/25279084\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Review changes\r\n- [ ] Other swift repositories should be ready for a source code breaking change\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\n **Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/205415078","html_url":"https://github.com/apple/swift/pull/2047#issuecomment-205415078","issue_url":"https://api.github.com/repos/apple/swift/issues/2047","id":205415078,"user":{"login":"harlanhaskins","id":853032,"avatar_url":"https://avatars.githubusercontent.com/u/853032?v=3","gravatar_id":"","url":"https://api.github.com/users/harlanhaskins","html_url":"https://github.com/harlanhaskins","followers_url":"https://api.github.com/users/harlanhaskins/followers","following_url":"https://api.github.com/users/harlanhaskins/following{/other_user}","gists_url":"https://api.github.com/users/harlanhaskins/gists{/gist_id}","starred_url":"https://api.github.com/users/harlanhaskins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harlanhaskins/subscriptions","organizations_url":"https://api.github.com/users/harlanhaskins/orgs","repos_url":"https://api.github.com/users/harlanhaskins/repos","events_url":"https://api.github.com/users/harlanhaskins/events{/privacy}","received_events_url":"https://api.github.com/users/harlanhaskins/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T17:53:21Z","updated_at":"2016-04-04T17:53:21Z","body":"There are some conflict markers scattered throughout `stdlib/core/Reflection.swift`"}}