Skip to content

[3.1][CodeComplete] Don't emit 'override' in protocol extension #7160

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jan 31, 2017

Cherry-pick #7140

Also, don't emit any inherited decls in protocol declaration.
@rintaro rintaro added this to the Swift 3.1 milestone Jan 31, 2017
@rintaro rintaro changed the title [3.1[CodeComplete] Don't emit 'override' in protocol extension [3.1][CodeComplete] Don't emit 'override' in protocol extension Jan 31, 2017
@rintaro
Copy link
Member Author

rintaro commented Jan 31, 2017

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 07382fe
Test requested by - @rintaro

@rintaro
Copy link
Member Author

rintaro commented Jan 31, 2017

@swift-ci Please test OS X Platform

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 07382fe
Test requested by - @rintaro

@rintaro
Copy link
Member Author

rintaro commented Jan 31, 2017

module cache problem?

/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:9: note: while building module 'CoreVideo' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:
#import <CoreVideo/CoreVideo.h>
        ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreVideo.h"
        ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:39:10: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:39:
#include <CoreVideo/CVOpenGLESTexture.h>
         ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVOpenGLESTexture.h:23:2: error: malformed or corrupted AST file: 'SourceLocation remap refers to unknown module'
#include <OpenGLES/gltypes.h>
 ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVOpenGLESTexture.h:23:2: note: after modifying system headers, please delete the module cache at '/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-swift-3.1-branch/buildbot_incremental/swift-macosx-x86_64/./module-cache/2VN2WIBCOLTD6'
#include <OpenGLES/gltypes.h>
 ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreImage.h"
        ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:15:9: note: in file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:15:
#import <CoreImage/CIImage.h>
        ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:9: error: could not build module 'CoreVideo'
#import <CoreVideo/CoreVideo.h>
        ^
/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-swift-3.1-branch/swift/stdlib/public/SDK/CoreImage/CoreImage.swift:14:19: error: could not build Objective-C module 'CoreImage'
@_exported import CoreImage  // Clang module

@swift-ci Please clean test OS X platform

@slavapestov
Copy link
Contributor

@benlangmuir Do we actually want to take this for 3.1? It seems low risk but it's not a regression...

@rintaro
Copy link
Member Author

rintaro commented Feb 1, 2017

@slavapestov @benlangmuir
It's a regression introduced in #4518.
But it's only for initializers in protocol extensions.

In Xcode8.2, this doesn't emit override keyword.

protocol BaseP {
    init(base: Int)
}
protocol TestP : BaseP {}
extension TestP {
    #^TOKEN^#
}

@benlangmuir
Copy link
Contributor

I think it's a good fix to take for 3.1; as @rintaro says it is a regression.

@tkremenek tkremenek merged commit 943ce6e into swiftlang:swift-3.1-branch Feb 8, 2017
@rintaro
Copy link
Member Author

rintaro commented Feb 9, 2017

Thank you!

@rintaro rintaro deleted the 3.1-codecomplete-override-protocol branch February 9, 2017 06:04
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.

5 participants