Skip to content

Commit

Permalink
Update BzlCompileValue.Key to use @AutoCodec.Interner instead of …
Browse files Browse the repository at this point in the history
…`@AutoCodec.Instantiator`.

PiperOrigin-RevId: 598911862
Change-Id: I7eeac51278eeebdc3ce533466b9869c0aa980e31
  • Loading branch information
Googler authored and copybara-github committed Jan 16, 2024
1 parent 012cb5a commit 823717d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,16 @@ private Key(Root root, Label label, Kind kind) {
}
}

@VisibleForSerialization
@AutoCodec.Instantiator
static Key create(Root root, Label label, Kind kind) {
private static Key create(Root root, Label label, Kind kind) {
return interner.intern(new Key(root, label, kind));
}

@VisibleForSerialization
@AutoCodec.Interner
static Key intern(Key key) {
return interner.intern(key);
}

/** Returns whether this key is for a {@code @_builtins} .bzl file. */
public boolean isBuiltins() {
return kind == Kind.BUILTINS;
Expand Down

0 comments on commit 823717d

Please sign in to comment.