Skip to content

Commit d79d442

Browse files
authored
ci: make semver-check takes precedence over public api (#1546)
# What does this PR do? Make semver-check takes precedence over public-api when detecting changed items. Co-authored-by: julio.gonzalez <[email protected]>
1 parent b4fe491 commit d79d442

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

scripts/semver-level.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,10 @@ compute_semver_results() {
112112
fi
113113
fi
114114

115-
# Check for changed items (major change)
116-
if echo "$PUBLIC_API_OUTPUT" | grep -q "^Changed items in the public API$"; then
117-
if ! echo "$PUBLIC_API_OUTPUT" | grep -A 2 "^Changed items in the public API$" | grep -q "^(none)$"; then
118-
LEVEL="major"
119-
log_verbose "Detected changed items (major change)" >&2
120-
fi
121-
fi
115+
# TODO: Improve parsing changed items with an allowlist. Right now is not working because there is some occasions
116+
# in which changed items are not a breaking change. Examples:
117+
# - Adding #[repr(c)] is not a breaking change (https://doc.rust-lang.org/cargo/reference/semver.html#repr-c-add).
118+
# - Removing #[repr(c)] is a breaking change.
122119

123120
# Check for added items (minor change) - only if not already major
124121
if [[ "$LEVEL" != "major" ]]; then

0 commit comments

Comments
 (0)