Skip to content

Commit c3deead

Browse files
committed
review progress
1 parent 0f53b3c commit c3deead

File tree

2 files changed

+6
-2
lines changed
  • external-crates/move/crates/move-package-alt/src/dependency

2 files changed

+6
-2
lines changed

external-crates/move/crates/move-package-alt/src/dependency/git.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use super::{DependencySet, Pinned, Unpinned};
4141

4242
// TODO: curious about the benefit of using String instead of wrapping it. The advantage of
4343
// wrapping it is that we have invariants (with the type alias, nothing prevents us from
44-
// writing `let x : Sha = ""`
44+
// writing `let x : Sha = ""` (whereas `let x = Sha::new("")` can fail)
4545
type Sha = String;
4646

4747
/// A git dependency that is unpinned. The `rev` field can be either empty, a branch, or a sha. To
@@ -78,6 +78,7 @@ pub struct PinnedGitDependency {
7878

7979
/// Helper struct that represents a Git repository, with extra information about which folder to
8080
/// checkout.
81+
// TODO: how is this different from [UnpinnedGitDependency]?
8182
#[derive(Clone, Debug)]
8283
pub struct GitRepo {
8384
/// Repository URL

external-crates/move/crates/move-package-alt/src/dependency/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ where
122122
Ok(ManifestDependencyInfo::Local(dep))
123123
} else {
124124
// TODO: maybe this could be prettier. The problem is that we don't know how to
125-
// tell if something is a flavor dependency
125+
// tell if something is a flavor dependency. One option might be to add a method to
126+
// [MoveFlavor] that gives the list of flavor dependency tags. Another approach
127+
// worth considering is removing flavor dependencies entirely and just having
128+
// on-chain dependencies (with the flavor being used to resolve them).
126129
let dep = toml::Value::try_from(data)
127130
.map_err(de::Error::custom)?
128131
.try_into()

0 commit comments

Comments
 (0)