Last active
December 17, 2015 20:09
-
-
Save mslinn/5665958 to your computer and use it in GitHub Desktop.
Shows the changes in compiled code from scalac between versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 3 ]; then | |
echo "Shows the changes in compiled code from scalac between versions" | |
echo "Usage: $BASH_SOURCE v1 v2 classname" | |
echo " Where v1 and v2 are legal Scala compiler versions, such as 2.8.0, 2.9.0 and 2.10" | |
echo " ... and classname is fully qualified, such as com/blah/MyClass" | |
exit -1 | |
fi | |
function input { | |
javap -classpath target/scala-$1/classes $2 | grep public | sort | |
} | |
diff -bBsw -C 0 <(input $1 $3) <(input $2 $3) | tail -n +3 |
larsrh, I took your suggestion, factored out a function and also chopped the first 3 lines of output because they no longer provide useful information.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool! You don't need those temp files though, there's a nice little bash trick: