Conversation
…ncy + remove deprecated assertSemanticConsistency
ibbem
left a comment
There was a problem hiding this comment.
Did you notice the failing test in CI?
DiffNode.assertConsistency fails (because of a missing feature mapping) for LineGraphTest.idempotentReadWrite() with file src/test/resources/line_graph/vulkan_structs.hpp\$\$\$fd641ac85c6170c34845db5e345d3bf9cedce8d7.lg.
This test case should be adjusted somehow.
For example `#if defined()` was accepted.
In general, `HashMap`s are not deterministic because the default implementation of the hash function might not be deterministic (as in, for example, openjdk 18.0.2). This matters in this case because it's incorrect to replace '>' before '>='.
According to C11, constant expressions (used in macro conditions) can contain all operators available in normal code except assignment, increment, decrement, function-call, or comma operators. (§ 6.6 paragraph 3)
An example where this now works is `#ifdef ifndef`.
Previously, the macro `#if defined A` was not parsed correctly because first the space was removed and afterwards it was tried to replace the `defined` operator.
Note: This changes the abstracted names of macro calls in an backwards incompatible way.
|
I just fixed the above mentioned parser issues. During coding/testing I found some more issues, some of them are already fixed. (Test cases follow later because I based them on #54 for easier testing.) There are still unsolved problems:
@TheBormann You can try to merge this again, I hope this fixes some issues for you. |
|
Hi @ibbem , thank you very much for your good review! I finally answered to your comments. Given that your upgrade to JUnit5 is now merged into
Thank you very much. |
|
Oops, I confused the other two pull-requests but the pull-request for JUnit5 is going to merged soon. :) |
|
PR #54 is now merged. |
6380363 to
0388513
Compare
|
I replaced your tests with the test suite I wrote and moved the above mentioned problems into wontfix tests. The test cases which was failing actually indicated a problem in the |
|
@pmbittner I don't know why, but I'm unable to request a review from you. So I just inform you that I finished working on this PR. |
|
Thank you for all the fixes! The change to using |
pmbittner
left a comment
There was a problem hiding this comment.
Changes look great! Only minor comments. Thank you very much! :)
You could not request a review from me because I am the author of the pull-request. 😅
There are many methods that just return garbage data and it's not documented that they may be unsupported. This also makes the interface for `DiffTree.fromPatch` more intuitive (I initially thought that it would take the diff from `PatchReference.getDiff`).
CommitDiffResult is not a good place to have such methods because its unexpected to have such convenience methods in the error handling type. Also, there are already many such convenience methods in `GitDiffer` most prominently `createCommitDiff` which does almost exactly what the moved method does, except it expects a `RevCommit` instead if a hash.
|
@pmbittner All the above mentioned issues are fixed now. |
|
Now only you have to approve the changes because initially you were the reviewer. ;) Afterwards, we can merge. |
ibbem
left a comment
There was a problem hiding this comment.
From my point of view, this is good to go.
Fixes for two parser bugs documented in issue #47 . Documentation is still missing but should be added.