Skip to content

Commit

Permalink
Update the api check.
Browse files Browse the repository at this point in the history
- With `main` now being used for releases, just need to check against the last release.
- Remove all the known breaks issues as we've done a release and thus reset the list.
  • Loading branch information
thomasvl committed Jul 8, 2024
1 parent d57a5ae commit b4d353b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 96 deletions.
29 changes: 4 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,6 @@ jobs:
working-directory: main
run: make compile-tests PROTOC=../protobuf/cmake_build/protoc

api-breakage-vs-main:
name: Api Breakage Compared to main Branch
# Only on pull requests
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
# Don't fail since we're actively revisit breaking changes on `main`
continue-on-error: true
container:
image: swift:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Check for API breaking changes
run: |
swift package diagnose-api-breaking-changes origin/main --breakage-allowlist-path known_api_breaks.txt
api-breakage-since-last-release:
name: Api Breakage Compared to Last Release
# Only on pull requests
Expand All @@ -151,11 +130,11 @@ jobs:
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Check for API breaking changes
# This will catch changes compared to the latest release. Once we go back
# to releasing off `main`, the go back to:
# LAST_TAG=$(git describe --abbrev=0 --tags)
# Since descriptor.proto is generated and exposed, any changes upstream
# can result in things that would count as breaking changes, the allowlist
# is used to those won't count in this test.
run: |
LAST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
LAST_TAG=$(git describe --abbrev=0 --tags)
echo "Checking for breaks against the tag: ${LAST_TAG}"
swift package diagnose-api-breaking-changes "${LAST_TAG}" --breakage-allowlist-path known_api_breaks.txt
Expand Down
71 changes: 0 additions & 71 deletions known_api_breaks.txt
Original file line number Diff line number Diff line change
@@ -1,71 +0,0 @@
API breakage: protocol Enum is now with @preconcurrency
API breakage: protocol Enum has added inherited protocol Sendable
API breakage: protocol Enum has generic signature change from <Self : Swift.Hashable, Self : Swift.RawRepresentable> to <Self : Swift.Hashable, Self : Swift.RawRepresentable, Self : Swift.Sendable>
API breakage: protocol ExtensibleMessage is now with @preconcurrency
API breakage: protocol ExtensibleMessage has added inherited protocol Sendable
API breakage: protocol AnyExtensionField is now with @preconcurrency
API breakage: protocol AnyExtensionField has added inherited protocol Sendable
API breakage: protocol AnyExtensionField has generic signature change from <Self : Swift.CustomDebugStringConvertible> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.Sendable>
API breakage: protocol ExtensionField is now with @preconcurrency
API breakage: protocol ExtensionField has added inherited protocol Sendable
API breakage: protocol ExtensionField has removed inherited protocol CustomDebugStringConvertible
API breakage: protocol ExtensionMap is now with @preconcurrency
API breakage: protocol ExtensionMap has added inherited protocol Sendable
API breakage: protocol ExtensionMap has generic signature change from to <Self : Swift.Sendable>
API breakage: protocol FieldType is now with @preconcurrency
API breakage: protocol FieldType has added inherited protocol Sendable
API breakage: protocol FieldType has generic signature change from <Self.BaseType : Swift.Hashable> to <Self : Swift.Sendable, Self.BaseType : Swift.Hashable, Self.BaseType : Swift.Sendable>
API breakage: protocol MapKeyType is now with @preconcurrency
API breakage: protocol MapKeyType has added inherited protocol Sendable
API breakage: protocol MapValueType is now with @preconcurrency
API breakage: protocol MapValueType has added inherited protocol Sendable
API breakage: protocol Message is now with @preconcurrency
API breakage: protocol Message has added inherited protocol Sendable
API breakage: protocol Message has generic signature change from <Self : Swift.CustomDebugStringConvertible> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.Sendable>
API breakage: protocol _MessageImplementationBase is now with @preconcurrency
API breakage: protocol _MessageImplementationBase has added inherited protocol Sendable
API breakage: protocol AnyMessageExtension is now with @preconcurrency
API breakage: protocol AnyMessageExtension has added inherited protocol Sendable
API breakage: protocol AnyMessageExtension has generic signature change from to <Self : Swift.Sendable>
API breakage: subscript SimpleExtensionMap.subscript(_:_:) has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
API breakage: accessor SimpleExtensionMap.subscript(_:_:).Get() has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
API breakage: constructor Google_Protobuf_Any.init(textFormatString:options:extensions:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: func Google_Protobuf_Any.messageType(forTypeURL:) has return type change from SwiftProtobuf.Message.Type? to (any SwiftProtobuf.Message.Type)?
API breakage: func Google_Protobuf_Any.messageType(forMessageName:) has return type change from SwiftProtobuf.Message.Type? to (any SwiftProtobuf.Message.Type)?
API breakage: func AnyMessageExtension._protobuf_newField(decoder:) has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
API breakage: func MessageExtension._protobuf_newField(decoder:) has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
API breakage: func Message.merge(contiguousBytes:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(jsonString:extensions:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(jsonUTF8Data:extensions:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(textFormatString:extensions:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(textFormatString:options:extensions:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(contiguousBytes:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: func Message.merge(serializedData:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(unpackingAny:extensions:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: constructor Message.init(serializedData:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: subscript ExtensionMap.subscript(_:_:) has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
API breakage: accessor ExtensionMap.subscript(_:_:).Get() has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
API breakage: subscript ExtensionFieldValueSet.subscript(_:) has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
API breakage: accessor ExtensionFieldValueSet.subscript(_:).Get() has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
API breakage: accessor ExtensionFieldValueSet.subscript(_:).Set() has parameter 0 type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
API breakage: func BinaryDelimited.parse(messageType:from:extensions:partial:options:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: func BinaryDelimited.merge(into:from:extensions:partial:options:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
API breakage: enumelement Google_Protobuf_Edition.legacy has been added as a new enum case
API breakage: var Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault.hasFeatures has been removed
API breakage: func Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault.clearFeatures() has been removed
API breakage: var Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault.features has been renamed to var fixedFeatures

API breakage: var Descriptor.file changes from weak to strong
API breakage: var EnumDescriptor.file changes from weak to strong
API breakage: var EnumValueDescriptor.enumType changes from weak to strong
API breakage: var EnumValueDescriptor.file changes from weak to strong
API breakage: var OneofDescriptor.containingType changes from weak to strong
API breakage: var OneofDescriptor.file changes from weak to strong
API breakage: var FieldDescriptor.file changes from weak to strong
API breakage: var FieldDescriptor.containingType changes from weak to strong
API breakage: var FieldDescriptor.extensionScope changes from weak to strong
API breakage: var FieldDescriptor.messageType changes from weak to strong
API breakage: var FieldDescriptor.enumType changes from weak to strong
API breakage: var ServiceDescriptor.file changes from weak to strong
API breakage: var MethodDescriptor.service changes from weak to strong
API breakage: var MethodDescriptor.file changes from weak to strong

0 comments on commit b4d353b

Please sign in to comment.