Skip to content

Commit

Permalink
temp: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eerii committed Nov 14, 2024
1 parent c4be927 commit 2495a2d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion binary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "system-deps-binary"
version = "0.1.0"
edition = "2021"
links = "system-deps-binary"

[build-dependencies]
system-deps-meta = { path = "../meta" }
Expand Down
2 changes: 1 addition & 1 deletion binary/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn paths() -> HashMap<String, Vec<PathBuf>> {
let mut follow_list = HashMap::new();

// Global overrides from environment
// TODO: This need to come first
// TODO: Change this so the env set global url always is first in the list of paths
if let Some(url) = env("SYSTEM_DEPS_BINARY_URL") {
let checksum = env("SYSTEM_DEPS_BINARY_CHECKSUM");
let pkg_paths = env("SYSTEM_DEPS_BINARY_PKG_PATHS");
Expand Down
2 changes: 1 addition & 1 deletion meta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn find_by_path(mut dir: PathBuf) -> Option<PathBuf> {
/// Get the manifest from the project directory. This is **not** the directory
/// where `system-deps` is cloned, it should point to the top level `Cargo.toml`
/// file. This is needed to obtain metadata from all of dependencies, including
/// those upstream of the package being compiled.
/// those downstream of the package being compiled.
///
/// If the target directory is not a subfolder of the project it will not be
/// possible to detect it automatically. In this case, the user will be asked
Expand Down
4 changes: 3 additions & 1 deletion meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ fn check_cfg(lit: &str) -> Option<bool> {

/// Inserts values from b into a only if they don't already exist.
/// TODO: This function could be a lot cleaner and it needs better error handling.
/// The logic for merging values needs to handle more cases so during testing this will have to be rewritten.
/// Additionally, make sure that only downstream crates can override the metadata.
fn merge(a: &mut Value, b: Value) {
match (a, b) {
(a @ &mut Value::Object(_), Value::Object(b)) => {
Expand All @@ -66,7 +68,7 @@ fn merge(a: &mut Value, b: Value) {
}

/// Recursively read dependency manifests to find metadata matching a key.
/// The matching metadata is aggregated in a list, with upstream crates having priority
/// The matching metadata is aggregated in a list, with downstream crates having priority
/// for overwriting values. It will only read from the metadata sections matching the
/// provided key.
///
Expand Down

0 comments on commit 2495a2d

Please sign in to comment.