Skip to content

Commit c0bf503

Browse files
committed
Don't check for interface compatibilities in the semgrep-core interface.
We'll need to add an option to make this safer. See TODO.
1 parent bd2cf34 commit c0bf503

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/check-backwards-compatibility

+12-2
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,28 @@ for tag in $tags; do
3434

3535
set +e # do our own error handling for a bit
3636
echo "Checking backward compatibility of semgrep_output_v1.atd against past version $tag"
37+
38+
# We don't check for incompatibilities in the pysemgrep/semgrep-core
39+
# interface because these two programs are always distributed together,
40+
# allowing their interface to change freely.
41+
#
42+
# TODO: add the option '--ignore core_output,targets' so as to produce
43+
# an error if we fail to update the '--types' option when adding
44+
# future new type definitions. This requires atddiff > 2.15.
45+
atddiff_options="--no-locations --backward --types ci_scan_complete_response,ci_scan_results_response,deployment_response,diff_files,function_call,function_return,partial_scan_result,scan_config,scan_request,scan_response,tests_result"
46+
3747
# I'm getting an exit code 128 when atddiff returns 3 (as of git 2.43.0),
3848
# contrary to what 'git difftool --help' promises for '--trust-exit-code'.
3949
# I'd report the bug if it was easier. -- Martin
40-
git difftool --trust-exit-code -x 'atddiff --no-locations --backward' -y \
50+
git difftool --trust-exit-code -x 'atddiff $atddiff_options' -y \
4151
"$tag" "origin/main" -- semgrep_output_v1.atd > before.txt
4252
ret=$?
4353
if [ "$ret" -ge 1 ] && [ "$ret" -le 2 ]; then
4454
echo "ERROR: atddiff had an error: $ret"
4555
cat before.txt
4656
exit 1
4757
fi
48-
git difftool --trust-exit-code -x 'atddiff --no-locations --backward' -y \
58+
git difftool --trust-exit-code -x 'atddiff $atddiff_options' -y \
4959
"$tag" "HEAD" -- semgrep_output_v1.atd > after.txt
5060
ret=$?
5161
if [ "$ret" -ge 1 ] && [ "$ret" -le 2 ]; then

0 commit comments

Comments
 (0)