-
Notifications
You must be signed in to change notification settings - Fork 24
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
Remove curl dependency and disable OAuth Bearer SASL mechanism #155
Conversation
@@ -309,7 +309,7 @@ extension KafkaConfiguration { | |||
} | |||
} | |||
|
|||
public struct OAuthBearerMethod: Sendable, Hashable { | |||
struct OAuthBearerMethod: Sendable, Hashable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't it be (formally) a breaking change if anyone uses that one for auth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would but we haven't released a major yet so removing APIs is still possible. I would love to get the package into a state where we don't require system dependencies at all.
The curl dependency is just necessary for the OAuth Bearer SASL mechanism. Let's remove that configuration option for now. Removes the curl dependency.
There's a couple more duplicated definitions.
b3548a6
to
ff579ee
Compare
I can see that there's lots of duplicated These swift-kafka-client/Sources/Crdkafka/custom/config/config.h Lines 22 to 31 in ff579ee
are duplicated just a few lines below swift-kafka-client/Sources/Crdkafka/custom/config/config.h Lines 34 to 38 in ff579ee
|
This took me a while. `ENABLE_CURL` and `WITH_CURL` are two different definitions.
This was confusing as heck, but I've got things to build locally at least. Turns out |
Oh fun, the build is still broken on Linux |
Can't get things to compile without doing this. I'm either missing some glaringly obvious flag I need to disable, or there's an issue with the `librdkafka` version we are using when one tries to build without `curl`.
@@ -72,7 +78,6 @@ let package = Package( | |||
.define("_GNU_SOURCE", to: "1"), // Fix build error for Swift 5.9 onwards | |||
], | |||
linkerSettings: [ | |||
.linkedLibrary("curl"), | |||
.linkedLibrary("sasl2"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this here as well then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't get rid of sasl2
, as that would disable the more generic SASL authentication mechanisms, like SASL/PLAIN
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay we should look into building libsassl with SwiftPM then to avoid the system dependency.
Motivation
The curl dependency is just necessary for the OAuth Bearer SASL mechanism. Let's remove that configuration option for now.
Modification
Removes the curl dependency.