Add uncommited generation checking to all the gen tasks.

If checking="true" on them, they generate their code to a String instead of a file, and compare that
against existing output.  If any generation would produce changes, the build is failed.

As a side effect, generation will now only write files if it's going to modify them, which should
eliminate some spurious compiling.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6349 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Charlie Groves
2010-12-09 07:43:18 +00:00
parent 0b77c89fa7
commit 39405136e9
19 changed files with 190 additions and 169 deletions
@@ -21,20 +21,17 @@
package com.threerings.presents.tools;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.io.File;
import com.google.common.collect.Lists;
import com.samskivert.util.StringUtil;
import com.threerings.presents.annotation.TransportHint;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.DSet;
@@ -165,7 +162,7 @@ public class GenDObjectTask extends GenTask
}
// now bolt everything back together into a class declaration
sfile.writeTo(source, fsection.toString(), msection.toString());
writeFile(source.getAbsolutePath(), sfile.generate(fsection.toString(), msection.toString()));
}
/** {@link DObject} resolved with the proper classloader so that we