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

Vapor 4.86.0 breaks VaporToOpenAPI build #16

Closed
finestructure opened this issue Nov 13, 2023 · 7 comments
Closed

Vapor 4.86.0 breaks VaporToOpenAPI build #16

finestructure opened this issue Nov 13, 2023 · 7 comments

Comments

@finestructure
Copy link

An upstream change in Vapor seems to have broken the build of VaporToOpenAPI:

/Users/sas/Library/Developer/Xcode/DerivedData/spi-server-gsbjdobzvfgnckdblpfcxbfdtnun/SourcePackages/checkouts/VaporToOpenAPI/Sources/VaporToOpenAPI/Route+UserInfo.swift:64:22 Type of expression is ambiguous without a type annotation
/Users/sas/Library/Developer/Xcode/DerivedData/spi-server-gsbjdobzvfgnckdblpfcxbfdtnun/SourcePackages/checkouts/VaporToOpenAPI/Sources/VaporToOpenAPI/Route+UserInfo.swift:64:22 Type of expression is ambiguous without a type annotation

CleanShot 2023-11-13 at 10 06 59@2x

It still works fine with the previous Vapor version of 4.85.1.

I'm not sure if this is a Vapor problem or Vapor exposing a VaporToOpenAPI problem but I thought I'd start by posting an issue here :)

finestructure added a commit to SwiftPackageIndex/SwiftPackageIndex-Server that referenced this issue Nov 13, 2023
@finestructure
Copy link
Author

I'll try and figure out what's going on of course but I wanted to post this early in case it's immediately clear to someone else what's happening here.

finestructure added a commit to SwiftPackageIndex/SwiftPackageIndex-Server that referenced this issue Nov 13, 2023
@0xTim
Copy link

0xTim commented Nov 13, 2023

@finestructure this is an issue on Vapor's side - AnySendableHashable was supposed to be essentially backwards compatible with AnyHashable with a warning introduced if the value wasn't Sendable but it appears Swift does some magic with AnyHashable that we don't/can't. We had code that checks it but it looks like it depends on the usage for whether the compiler sees it as the same. I'm investigating whether we can do something to make it automatic or whether we need to add conformances for String etc manually and reduce the issue

@finestructure
Copy link
Author

Ah, great to hear that you already have an idea what's happening. Thanks a lot, Tim!

@dankinsoid
Copy link
Owner

@0xTim should I do smth to fix it in my library or wait for Vapor fix?

@0xTim
Copy link

0xTim commented Nov 16, 2023

@dankinsoid it should be fixed by https://github.com/vapor/console-kit/releases/tag/4.10.2

@finestructure you can try that release. We'll have a Vapor release that pins to it soon

@gwynne
Copy link

gwynne commented Nov 16, 2023

vapor/vapor#3100 will provide the pin in question when merged, for the record.

@finestructure
Copy link
Author

Thanks a lot @0xTim ! I've tested this here, it's all working again.

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

4 participants