Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an overload of bind that accepts a log #281

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion java/com/google/turbine/binder/Binder.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ public final class Binder {
ClassPath bootclasspath,
Optional<String> moduleVersion) {
TurbineLog log = new TurbineLog();
BindingResult br = bind(log, units, classpath, processorInfo, bootclasspath, moduleVersion);
log.maybeThrow();
return br;
}

/** Binds symbols and types to the given compilation units. */
public static @Nullable BindingResult bind(
TurbineLog log,
ImmutableList<CompUnit> units,
ClassPath classpath,
ProcessorInfo processorInfo,
ClassPath bootclasspath,
Optional<String> moduleVersion) {
BindingResult br;
try {
br =
Expand All @@ -114,7 +127,6 @@ public final class Binder {
.addAll(turbineError.diagnostics())
.build());
}
log.maybeThrow();
return br;
}

Expand Down
Loading