GumTreeDiff / gumtree

An awesome code differencing tool
https://github.com/GumTreeDiff/gumtree/wiki
GNU Lesser General Public License v3.0
893 stars 170 forks source link

Fix paths of files to read for webdiff #341

Closed jpienaar closed 4 months ago

jpienaar commented 4 months ago

This was most direct way to avoid the error below and seems consistent with the vanilla.css readFile instance.

./dist/build/install/gumtree/bin/gumtree htmldiff /tmp/lhs.mlir /tmp/rhs.mlir
Error while running client 'htmldiff'.
java.lang.NullPointerException
    at java.base/java.io.Reader.<init>(Reader.java:168)
    at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:112)
    at com.github.gumtreediff.client.diff.webdiff.VanillaDiffView$Header.readFile(VanillaDiffView.java:115)
    at com.github.gumtreediff.client.diff.webdiff.VanillaDiffView$Header.build(VanillaDiffView.java:106)
    at com.github.gumtreediff.client.diff.webdiff.VanillaDiffView.build(VanillaDiffView.java:42)
    at com.github.gumtreediff.client.diff.HtmlDiff.run(HtmlDiff.java:67)
    at com.github.gumtreediff.client.Run.startClient(Run.java:94)
    at com.github.gumtreediff.client.Run.main(Run.java:128)
jrfaller commented 4 months ago

Merged! Thanks a lot for the PR. BTW, you might want to try gumtree webdiff which offers more advanced GUIs!

jpienaar commented 4 months ago

Indeed yes (I like the mergely one there). Probably should ask elsewhere, but do you know how the different variants scale? e.g., can I use this for rather large inputs ? (I'm guessing a function of the grammars too)

jrfaller commented 4 months ago

Hi! normally all the variants scale well. If you have some trouble with the AST diffs (vanilla, monaco), make sure to install and try version 4.0-beta1 since we improved a lot the performances of our default algorithm!

Cheers.