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

CloudEnvironment.Credentials is incompatible with Kitura-Credentials (or the other way around) #47

Closed
krzyzanowskim opened this issue Jan 7, 2018 · 1 comment

Comments

@krzyzanowskim
Copy link

If both modules CoudEnvirnment and Kitura-Credentials (Credentials) is imported, the type Credentials is ambiguous for the compiler. It looks like it's a compiler limitation https://bugs.swift.org/browse/SR-6705 so It may be a good idea to address the issue on the source level. Since CloudEnvironment is often used with the Kitura framework, it may be a good idea to clarify the Credentials type.

Kitura-Credentials report: Kitura/Kitura-Credentials#36

import CloudEnvironment
import Credentials

public class App {
    let credentials: Credentials.Credentials
}
Application.swift:18:22: error: 'Credentials' is ambiguous for type lookup in this context
    var credentials: Credentials.Credentials
                     ^~~~~~~~~~~
CloudEnvironment.Credentials:4:14: note: found this candidate
public class Credentials {
             ^
Credentials.Credentials:2:14: note: found this candidate
public class Credentials : RouterMiddleware {
             ^
@EnriqueL8
Copy link
Contributor

Hey @krzyzanowskim, an idea to solve this is to define a typealias for example

typealias CloudEnvironmentCredentials = CloudEnvironment.Credentials

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

No branches or pull requests

2 participants