I tested this same change in our repos and found it works and gets the scalac args back in proper order, ie, what was: compile options: 6 items 1 -> UTF-8 0 -> -encoding 3 -> -Ydependent-method-types 2 -> -g:vars 5 -> -unchecked 4 -> -deprecation Is now: compile options: 6 items 0 -> -encoding 1 -> UTF-8 2 -> -g:vars 3 -> -Ydependent-method-types 4 -> -deprecation 5 -> -unchecked
Make sure zinc analysis is always sorted.
Review Request #369 — Created May 16, 2014 and submitted
Note that we still need to check if this is a performance issue. If so, we can sort only the sections that must be sorted for correctness (namely, compile options). But then we have to verify that Zinc is OK with sections being unsorted. It should be, but you never know. My attempt to replace the defaultdict(lists) with OrderedDicts had noticeable performance impact, so that's probably not the way to go. Ultimately we need to benchmark this. TODO: modify zinc to be more careful about how it compares compile options between analysis files.