Skip to content

Commit

Permalink
Disable some python logic for query sync.
Browse files Browse the repository at this point in the history
It does not work, and query sync does not support python. Disable it to fix exception logspam.

(cherry picked from commit 67558e2)
  • Loading branch information
Googler authored and mai93 committed Dec 5, 2023
1 parent f86e7af commit f68b410
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import com.google.idea.blaze.base.ideinfo.TargetIdeInfo;
import com.google.idea.blaze.base.model.BlazeProjectData;
import com.google.idea.blaze.base.model.primitives.LanguageClass;
import com.google.idea.blaze.base.settings.Blaze;
import com.google.idea.blaze.base.settings.BlazeImportSettings.ProjectType;
import com.google.idea.blaze.base.sync.SyncCache;
import com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder;
import com.google.idea.blaze.python.resolve.BlazePyResolverUtils;
Expand Down Expand Up @@ -89,6 +91,9 @@ public final void addImportCandidates(

@Nullable
private PySourcesIndex getSourcesIndex(Project project) {
if (Blaze.getProjectType(project) == ProjectType.QUERY_SYNC) {
return null;
}
return SyncCache.getInstance(project).get(getClass(), this::buildSourcesIndex);
}

Expand Down

0 comments on commit f68b410

Please sign in to comment.