bazel skylarkinterface: create a default implementation of repr
It matches the behavior of Printer.
This change is necessary so that we can make all
classes (incl. those in Copybara) implement SkylarkValue (see CL 278389187).
@@ -26,7 +26,9 @@ public interface SkylarkValue {
*
* @param printer a printer to be used for formatting nested values.
*/
- void repr(SkylarkPrinter printer);
+ default void repr(SkylarkPrinter printer) {
+ printer.append("<unknown object ").append(getClass().getName()).append(">");
+ }
/**
* Prints an informal, human-readable representation of the value.
