File tree Expand file tree Collapse file tree
src/main/java/com/google/devtools/build/lib/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import com .google .devtools .build .lib .skylarkinterface .SkylarkCallable ;
2121import com .google .devtools .build .lib .skylarkinterface .SkylarkModule ;
2222import com .google .devtools .build .lib .skylarkinterface .SkylarkModuleCategory ;
23+ import com .google .devtools .build .lib .skylarkinterface .SkylarkPrinter ;
24+ import com .google .devtools .build .lib .skylarkinterface .SkylarkValue ;
2325import com .google .devtools .build .lib .util .Preconditions ;
2426import com .google .devtools .build .lib .vfs .Path ;
2527import com .google .devtools .build .lib .vfs .PathFragment ;
4850 doc = "A root for files. The roots are the directories containing files, and they are mapped "
4951 + "together into a single directory tree to form the execution environment." )
5052@ Immutable
51- public final class Root implements Comparable <Root >, Serializable {
53+ public final class Root implements Comparable <Root >, Serializable , SkylarkValue {
5254
5355 /**
5456 * Returns the given path as a source root. The path may not be {@code null}.
@@ -217,4 +219,9 @@ public boolean equals(Object o) {
217219 public String toString () {
218220 return path + (isSourceRoot () ? "[source]" : "[derived]" );
219221 }
222+
223+ @ Override
224+ public void repr (SkylarkPrinter printer ) {
225+ printer .append (toString ());
226+ }
220227}
You can’t perform that action at this time.
0 commit comments