Skip to content

Commit b4d353b

Browse files
committed
Update the api check.
- 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.
1 parent d57a5ae commit b4d353b

File tree

2 files changed

+4
-96
lines changed

2 files changed

+4
-96
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,6 @@ jobs:
109109
working-directory: main
110110
run: make compile-tests PROTOC=../protobuf/cmake_build/protoc
111111

112-
api-breakage-vs-main:
113-
name: Api Breakage Compared to main Branch
114-
# Only on pull requests
115-
if: github.event_name == 'pull_request'
116-
runs-on: ubuntu-latest
117-
# Don't fail since we're actively revisit breaking changes on `main`
118-
continue-on-error: true
119-
container:
120-
image: swift:latest
121-
steps:
122-
- name: Checkout
123-
uses: actions/checkout@v4
124-
with:
125-
fetch-depth: 0
126-
- name: Mark the workspace as safe
127-
# https://github.com/actions/checkout/issues/766
128-
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
129-
- name: Check for API breaking changes
130-
run: |
131-
swift package diagnose-api-breaking-changes origin/main --breakage-allowlist-path known_api_breaks.txt
132-
133112
api-breakage-since-last-release:
134113
name: Api Breakage Compared to Last Release
135114
# Only on pull requests
@@ -151,11 +130,11 @@ jobs:
151130
# https://github.com/actions/checkout/issues/766
152131
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
153132
- name: Check for API breaking changes
154-
# This will catch changes compared to the latest release. Once we go back
155-
# to releasing off `main`, the go back to:
156-
# LAST_TAG=$(git describe --abbrev=0 --tags)
133+
# Since descriptor.proto is generated and exposed, any changes upstream
134+
# can result in things that would count as breaking changes, the allowlist
135+
# is used to those won't count in this test.
157136
run: |
158-
LAST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
137+
LAST_TAG=$(git describe --abbrev=0 --tags)
159138
echo "Checking for breaks against the tag: ${LAST_TAG}"
160139
swift package diagnose-api-breaking-changes "${LAST_TAG}" --breakage-allowlist-path known_api_breaks.txt
161140

known_api_breaks.txt

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +0,0 @@
1-
API breakage: protocol Enum is now with @preconcurrency
2-
API breakage: protocol Enum has added inherited protocol Sendable
3-
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>
4-
API breakage: protocol ExtensibleMessage is now with @preconcurrency
5-
API breakage: protocol ExtensibleMessage has added inherited protocol Sendable
6-
API breakage: protocol AnyExtensionField is now with @preconcurrency
7-
API breakage: protocol AnyExtensionField has added inherited protocol Sendable
8-
API breakage: protocol AnyExtensionField has generic signature change from <Self : Swift.CustomDebugStringConvertible> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.Sendable>
9-
API breakage: protocol ExtensionField is now with @preconcurrency
10-
API breakage: protocol ExtensionField has added inherited protocol Sendable
11-
API breakage: protocol ExtensionField has removed inherited protocol CustomDebugStringConvertible
12-
API breakage: protocol ExtensionMap is now with @preconcurrency
13-
API breakage: protocol ExtensionMap has added inherited protocol Sendable
14-
API breakage: protocol ExtensionMap has generic signature change from to <Self : Swift.Sendable>
15-
API breakage: protocol FieldType is now with @preconcurrency
16-
API breakage: protocol FieldType has added inherited protocol Sendable
17-
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>
18-
API breakage: protocol MapKeyType is now with @preconcurrency
19-
API breakage: protocol MapKeyType has added inherited protocol Sendable
20-
API breakage: protocol MapValueType is now with @preconcurrency
21-
API breakage: protocol MapValueType has added inherited protocol Sendable
22-
API breakage: protocol Message is now with @preconcurrency
23-
API breakage: protocol Message has added inherited protocol Sendable
24-
API breakage: protocol Message has generic signature change from <Self : Swift.CustomDebugStringConvertible> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.Sendable>
25-
API breakage: protocol _MessageImplementationBase is now with @preconcurrency
26-
API breakage: protocol _MessageImplementationBase has added inherited protocol Sendable
27-
API breakage: protocol AnyMessageExtension is now with @preconcurrency
28-
API breakage: protocol AnyMessageExtension has added inherited protocol Sendable
29-
API breakage: protocol AnyMessageExtension has generic signature change from to <Self : Swift.Sendable>
30-
API breakage: subscript SimpleExtensionMap.subscript(_:_:) has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
31-
API breakage: accessor SimpleExtensionMap.subscript(_:_:).Get() has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
32-
API breakage: constructor Google_Protobuf_Any.init(textFormatString:options:extensions:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
33-
API breakage: func Google_Protobuf_Any.messageType(forTypeURL:) has return type change from SwiftProtobuf.Message.Type? to (any SwiftProtobuf.Message.Type)?
34-
API breakage: func Google_Protobuf_Any.messageType(forMessageName:) has return type change from SwiftProtobuf.Message.Type? to (any SwiftProtobuf.Message.Type)?
35-
API breakage: func AnyMessageExtension._protobuf_newField(decoder:) has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
36-
API breakage: func MessageExtension._protobuf_newField(decoder:) has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
37-
API breakage: func Message.merge(contiguousBytes:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
38-
API breakage: constructor Message.init(jsonString:extensions:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
39-
API breakage: constructor Message.init(jsonUTF8Data:extensions:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
40-
API breakage: constructor Message.init(textFormatString:extensions:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
41-
API breakage: constructor Message.init(textFormatString:options:extensions:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
42-
API breakage: constructor Message.init(contiguousBytes:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
43-
API breakage: func Message.merge(serializedData:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
44-
API breakage: constructor Message.init(unpackingAny:extensions:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
45-
API breakage: constructor Message.init(serializedData:extensions:partial:options:) has parameter 1 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
46-
API breakage: subscript ExtensionMap.subscript(_:_:) has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
47-
API breakage: accessor ExtensionMap.subscript(_:_:).Get() has return type change from SwiftProtobuf.AnyMessageExtension? to (any SwiftProtobuf.AnyMessageExtension)?
48-
API breakage: subscript ExtensionFieldValueSet.subscript(_:) has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
49-
API breakage: accessor ExtensionFieldValueSet.subscript(_:).Get() has return type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
50-
API breakage: accessor ExtensionFieldValueSet.subscript(_:).Set() has parameter 0 type change from SwiftProtobuf.AnyExtensionField? to (any SwiftProtobuf.AnyExtensionField)?
51-
API breakage: func BinaryDelimited.parse(messageType:from:extensions:partial:options:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
52-
API breakage: func BinaryDelimited.merge(into:from:extensions:partial:options:) has parameter 2 type change from SwiftProtobuf.ExtensionMap? to (any SwiftProtobuf.ExtensionMap)?
53-
API breakage: enumelement Google_Protobuf_Edition.legacy has been added as a new enum case
54-
API breakage: var Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault.hasFeatures has been removed
55-
API breakage: func Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault.clearFeatures() has been removed
56-
API breakage: var Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault.features has been renamed to var fixedFeatures
57-
58-
API breakage: var Descriptor.file changes from weak to strong
59-
API breakage: var EnumDescriptor.file changes from weak to strong
60-
API breakage: var EnumValueDescriptor.enumType changes from weak to strong
61-
API breakage: var EnumValueDescriptor.file changes from weak to strong
62-
API breakage: var OneofDescriptor.containingType changes from weak to strong
63-
API breakage: var OneofDescriptor.file changes from weak to strong
64-
API breakage: var FieldDescriptor.file changes from weak to strong
65-
API breakage: var FieldDescriptor.containingType changes from weak to strong
66-
API breakage: var FieldDescriptor.extensionScope changes from weak to strong
67-
API breakage: var FieldDescriptor.messageType changes from weak to strong
68-
API breakage: var FieldDescriptor.enumType changes from weak to strong
69-
API breakage: var ServiceDescriptor.file changes from weak to strong
70-
API breakage: var MethodDescriptor.service changes from weak to strong
71-
API breakage: var MethodDescriptor.file changes from weak to strong

0 commit comments

Comments
 (0)