Skip to content

Commit

Permalink
Temporarily warn about version field in dependencies
Browse files Browse the repository at this point in the history
We no longer use the GitHub REST API and in turn no longer map the
`version` field to GitHub "release"s. Instead, we now support git more
generally. Warn about appearances of the `version` field in dependencies
and suggest using `branch` or `tag` as an alternative.
  • Loading branch information
mitchmindtree committed Mar 2, 2022
1 parent d896d0c commit 881d638
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions forc/src/pkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,18 @@ impl BuildPlan {
.into_iter()
.flat_map(|deps| deps.iter())
.map(|(name, dep)| {
// NOTE: Temporarily warn about `version` until we have support for registries.
if let Dependency::Detailed(det) = dep {
if det.version.is_some() {
crate::utils::helpers::println_yellow_err(&format!(
" WARNING! Dependency \"{}\" specifies the unused `version` field: \
consider using `branch` or `tag` instead",
name
))
.unwrap();
}
}

let name = name.clone();
let source = dep_to_source(proj_path, dep)?;
Ok(Pkg { name, source })
Expand Down

0 comments on commit 881d638

Please sign in to comment.