Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Check out the existence of http_archive in WORKSPACE #578

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public HttpArchiveDepsList getHttpArchiveDeps(
httpArchive = currentHttpArchive;
}
}
if (httpArchive.getName().isEmpty()) {
log.atWarning().log("Can't find %s http_archive in WORKSPACE file", httpArchiveName);
continue;
}
if (areCommitIdsTheSame(httpArchiveName, getCommitId(httpArchive.getStripPrefix()))) {
log.atInfo().log(
"Commit id in WORKSPACE file and commit id in \'%s\' file for \'%s\' http_archive "
Expand Down Expand Up @@ -231,7 +235,11 @@ private boolean areCommitIdsTheSame(String httpArchiveName, String workspaceComm
break;
}
}
return workspaceCommitId.equals(prototxtCommitId);
if (prototxtCommitId.isEmpty()) {
return false;
} else {
return workspaceCommitId.equals(prototxtCommitId);
}
}

private String shortenTarget(String fullTargetName) {
Expand Down