1

I was running Diffoscope on Ubuntu Bionic and when I turned on the debug log (--debug) I noticed many lines like these (one per .class file in the JAR):

diffoscope.comparators.java: Unable to find ProcyonDecompiler. Falling back...

I installed the package procyon-decompiler but the errors persist. How can I make Diffoscope work with Procyon? I can't find any documentation about this integration!

Martín Coll
  • 3,368
  • 3
  • 37
  • 52

1 Answers1

2

From reading the Python sources of diffoscope, I figured out that diffoscope was expecting an executable named procyon-decompiler in the path.

/usr/lib/python3/dist-packages/diffoscope/comparators/java.py:L40:

@tool_required('procyon-decompiler')
def cmdline(self):
    return ['procyon-decompiler', '-ec', self.path]

In Ubuntu Bionic, the procyon-decompiler package installs Procyon as procyon and not procyon-decompiler. I made this work by creating a symbolic link. E.g.:

ln -s /usr/bin/procyon ~/.local/bin/procyon-decompiler
Martín Coll
  • 3,368
  • 3
  • 37
  • 52
  • Under _Fedora Remix WSL_ I had this `'procyon' not available in path. Falling back to binary comparison.` I was able to solve it with a symbolic link as you said but the other way around: `ln -s /usr/bin/procyon-decompiler ~/.local/bin/procyon` I had to `mkdir ~/.local/bin` THANKS! – Metafaniel Nov 05 '22 at 04:02