Skip to content

Commit 7eba626

Browse files
benbrittainfacebook-github-bot
authored andcommitted
Add git fetch to universe dependency handling (#78)
Summary: Identical to how http archive rules are done. Pull Request resolved: #78 Reviewed By: JakobDegen Differential Revision: D75387030 Pulled By: dtolnay fbshipit-source-id: 20d67f668566854ee16462471325d23f3f8cbe1a
1 parent 9763168 commit 7eba626

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/buck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ impl Serialize for ExtractArchive {
509509
}
510510
}
511511

512-
#[derive(Debug)]
512+
#[derive(Debug, PartialEq)]
513513
pub struct GitFetch {
514514
pub name: Name,
515515
pub repo: String,

src/universe.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@ pub fn merge_universes(
222222
panic!("expected http_archive rules to be identical in every universe")
223223
}
224224
}
225+
Rule::GitFetch(old) => {
226+
let Rule::GitFetch(new) = rule else {
227+
panic!("expected git_fetch")
228+
};
229+
if *old != new {
230+
panic!("expected git_fetch rules to be identical in every universe")
231+
}
232+
}
225233
_ => {
226234
log::warn!(
227235
"Skipping unhandled rule while merging universes: {:?}",

0 commit comments

Comments
 (0)