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

Add check that generated code is up-to-date #2013

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Aug 9, 2024

Motivation:

It's easy for checked in generated code to not be up-to-date.

Modifications:

  • Add a script to check it's up-to-date and run it in CI

Result:

More guarantess that checked in code is up-to-date

@glbrntt glbrntt added the semver/none No version bump required. label Aug 9, 2024
@glbrntt glbrntt requested a review from gjcairo August 9, 2024 16:41
@glbrntt glbrntt enabled auto-merge (squash) August 9, 2024 16:41
glbrntt added 2 commits August 9, 2024 18:40
Motivation:

It's easy for checked in generated code to not be up-to-date.

Modifications:

- Add a script to check it's up-to-date and run it in CI
- That CI job now requires the Swift 6 toolchain, so we now rely on
  swift-format from the toolchain
- Also fixes casing issues in the genreate script

Result:

More guarantess that checked in code is up-to-date
@@ -119,7 +119,7 @@ function generate_reflection_service {
mv "$output_v1/reflection.grpc.swift" "$output_v1/reflection-v1.grpc.swift"

local proto_v1alpha="$here/upstream/grpc/reflection/v1alpha/reflection.proto"
local output_v1alpha="$root/Sources/GRPCReflectionService/v1alpha"
local output_v1alpha="$root/Sources/GRPCReflectionService/v1Alpha"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW this wasn't an issue on macOS as AFPS is case-insensitive by default.

@glbrntt glbrntt merged commit 9457258 into grpc:main Aug 12, 2024
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants