-
Notifications
You must be signed in to change notification settings - Fork 34
Bugfix/fix abi checking #755
Conversation
874b14e to
51dc328
Compare
|
https://github.com/tango-controls/cppTango/runs/1038310880#step:7:551 shows the breakage. |
|
Kudos, SonarCloud Quality Gate passed!
|
Turns out that the compliance check tool does not work in the current setup. The issue tracker [1] also suggests that we are not the only one. After fiddling with a lot of different flags and options of the abi-dumper and the abi-compliance-checker tool, it turns out that diff can help us here. We just diff the textual representation of the dump, and if we have differences, it most likely broke. The sed invocation removes the volatile parts of the dump with a fixed string. This also makes getting the html report as artifact obsolete. [1]: https://github.com/lvc/abi-compliance-checker/issues
This allows for convenient rebuilds on developer machines which are not pristine.
51dc328 to
df2a9b5
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
@t-b have you tried using Edit: Actually these dumps look like serialized perl data structures and the dumper tool seems to treat them as such: https://github.com/lvc/abi-dumper/blob/master/abi-dumper.pl#L6578-L6634 |
@t-b I think you didn't reply to this question from @mliszcz |
|
@bourtemb THanks for the reminder. I will have a look, altough I think that we could also just use what we have and see if it works in practice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @t-b, fine with me! This is still better than what we already have.
bourtemb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@t-b thanks for this PR.
We'll see in practice how it behaves.
I just added a small suggestion to remove a useless (I think, unless this option is useful on some operating system versions?) option in the diff but this option should not cause any harm in any case so it can be merged like that too.
| -list-affected || print_abi_api_breakages | ||
| sed "s/${old_revision}/fixed/g" ${base}/libtango-old-${old_revision}.dump > old.dump | ||
| sed "s/${new_revision}/fixed/g" ${base}/libtango-new-${new_revision}.dump > new.dump | ||
| diff -Nur old.dump new.dump || exit_on_abi_api_breakages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff -r option (to recursively compare subdirectories) does not hurt but is not needed here.
| -list-affected || print_abi_api_breakages | ||
| sed "s/${old_revision}/fixed/g" ${base}/libtango-old-${old_revision}.dump > old.dump | ||
| sed "s/${new_revision}/fixed/g" ${base}/libtango-new-${new_revision}.dump > new.dump | ||
| diff -Nur old.dump new.dump || exit_on_abi_api_breakages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| diff -Nur old.dump new.dump || exit_on_abi_api_breakages | |
| diff -Nu old.dump new.dump || exit_on_abi_api_breakages |
|
@bourtemb Thanks for the review. Yes the 'r' to diff is not needed, I would still merge as is, as it does not hurt and we can finally get this merged. |
So here is my stab at fixing the ABI checking.
This PR includes a commit which breaks the ABI, just to see that it is working better now. Judging from the open issues on the involved projects I doubt that this is foolproof, but at least I could get it working now. If we decide that this approach is too kludgy we can also just remove it again.
I'm getting the following now when I include the breaking commit
and no complaint when I revert the ABI breaking commit.
This approach does give quite some false positives, but I don't see how I can get the original approach working.