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

fix: lock deps to exact versions #289

Merged
merged 9 commits into from
Aug 16, 2018
Merged

fix: lock deps to exact versions #289

merged 9 commits into from
Aug 16, 2018

Conversation

anjmao
Copy link
Contributor

@anjmao anjmao commented Aug 15, 2018

fixes #288

@anjmao anjmao changed the title Lock deps fix: lock deps to exact versions Aug 15, 2018
@MrMage
Copy link
Collaborator

MrMage commented Aug 15, 2018

I think I would prefer to only version-lock the packages that need it, and only as much as needed. So for now, I would only lock SwiftProtobuf to . upToNextMinor(from: "1.0.2") (see https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md).

Let me know if you think differently.

@anjmao
Copy link
Contributor Author

anjmao commented Aug 15, 2018

@MrMage I think the most important thing is to ensure that grpc protoc plugin is used with the same version of swift grpc and swift protobuf. Currently this is how it looks:

https://github.com/grpc/grpc-swift/blob/master/SwiftGRPC.podspec#L44 In podspec version is
s.dependency 'SwiftProtobuf', '~> 1.0.3

In https://github.com/grpc/grpc-swift/blob/master/Package.swift#L21 version is from: 1.0.2

Since apple swift protobuf do not follow semver even having upToNextMinor(from: "1.0.2") can break things isn't it?

@MrMage
Copy link
Collaborator

MrMage commented Aug 15, 2018

Do you have any documentation on SwiftProtobuf‘s versioning? Haven’t been broken by revisions since 0.9, and i wouldn’t expect the 1.0 minor to receive any breaking changes in the future given that 1.1 is already out, but it might still receive bug fixes.

Also, if you desire consistency with the CocoaPods, we could use `.upToNextMinor(from: "1.0.3")’? The end result will be the same anyway.

@anjmao
Copy link
Contributor Author

anjmao commented Aug 16, 2018

I don't have any documentation, but if you look:

  1. Go to https://github.com/apple/swift-protobuf/releases
  2. Check Directly generate equality (one less indirection) apple/swift-protobuf#781 which actually is a breaking change because if you are generating code with swift-protobuf 1.1.1 you will not be able to use it with SwiftProtobuf 1.0.3 library. This is a breaking change and version should be 2.0.0 if semver is followed.

If upToNextMinor(from: "1.0.3") is updates to 1.1.1 version then it's not good, otherwise you can make your changes and close this PR. Thanks 👍

@MrMage
Copy link
Collaborator

MrMage commented Aug 16, 2018

upToNextMinor should always stay below 1.1, so it should work. Why not just try it?

@anjmao
Copy link
Contributor Author

anjmao commented Aug 16, 2018

Yes it works, I updated PR. Now swift protobuf is both 1.0.3 in code generation and pod library.

@MrMage MrMage merged commit 78ac010 into grpc:master Aug 16, 2018
rebello95 added a commit to rebello95/grpc-swift that referenced this pull request Aug 18, 2018
We should issue a new release which includes grpc#289 (the fix for grpc#288).
@rebello95 rebello95 mentioned this pull request Aug 18, 2018
IceRocky pushed a commit to IceRocky/grpc-swift that referenced this pull request May 28, 2024
We should issue a new release which includes grpc/grpc-swift#289 (the fix for grpc/grpc-swift#288).
teskobif7 added a commit to teskobif7/grpc-swift that referenced this pull request Aug 14, 2024
We should issue a new release which includes grpc/grpc-swift#289 (the fix for grpc/grpc-swift#288).
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.

Swift Protobuf breaking changes
2 participants