Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve artifact comparison delta results #3299

Closed

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Dec 22, 2023

Currently only the text is written as detailed information into the artifactcomparision directory.

This is often not enough information to find the actual difference, to mitigate this the handling of the writing is now delegated to the delta and the following improvements are made:

  • class file comparison writes the class file as well as the disassemble
  • debug info is included in the disassemble
  • zip comparator writes the baseline and build jars

Fix eclipse-platform/eclipse.platform.releng.aggregator#1688

Currently only the text is written as detailed information into the
artifactcomparision directory.

This is often not enough information to find the actual difference, to
mitigate this the handling of the writing is now delegated to the delta
and the following improvements are made:

- class file comparison writes the class file as well as the disassemble
- debug info is included in the disassemble
- zip comparator writes the baseline and build jars
@laeubi
Copy link
Member Author

laeubi commented Dec 22, 2023

@iloveeclipse and @srikanth-sankaran I'm not sure the current approach is 100% desired, while debug symbols might be useful for analysis, this will also lead to comparator errors if debug symbols change what seems undesirable. I can change this to use a different settings for compare and one for the debug output if you think it is suitable.

In general we can even use anything else from JDT that seems better suited to compare classfiles+generate diffs just let me know if there is something available, the comments in the gives some hints but they are likely outdated:

// there are two alternative ways to compare class files
// JDT ClassFileBytesDisassembler, but it depends on workbench, so out of question
// P2 JarComparator... which is a fork (yes, a fork) of JDT ClassFileBytesDisassembler,
// which is not exported, so can't use this either.

@laeubi laeubi marked this pull request as draft December 22, 2023 09:46
Copy link

Test Results

   576 files  ±0     576 suites  ±0   3h 28m 55s ⏱️ - 17m 8s
   380 tests ±0     373 ✔️  - 1    6 💤 ±0  0 ±0  1 🔥 +1 
1 140 runs  ±0  1 120 ✔️  - 1  19 💤 ±0  0 ±0  1 🔥 +1 

For more details on these errors, see this check.

Results for commit 9d628f6. ± Comparison against base commit 3cfab28.

@iloveeclipse
Copy link

@laeubi : can we split this PR in two: one, that changes the dump (adds also debug data) and one that adds class files to the generated artifacts zip file?

The former can wait for the next year (and I believe is fine anyway, I'm just paranoid), the later can be done immediately as it should not affect comparison algorithm.

@laeubi
Copy link
Member Author

laeubi commented Dec 22, 2023

Closing in favor of:

after that is merged we might (or not) start a new attempt to include debugging infos, maybe for the cases where one really wants to find out the difference using the raw class files and a dedicated tool works better anyways.

@laeubi laeubi closed this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance class file comparator diff report
2 participants