File tree Expand file tree Collapse file tree 5 files changed +9
-7
lines changed
Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 22name = " system-deps-binary"
33version = " 0.1.0"
44edition = " 2021"
5- links = " system-deps-binary"
65
76[build-dependencies ]
87system-deps-meta = { path = " ../meta" }
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ fn paths() -> HashMap<String, Vec<PathBuf>> {
115115 let mut follow_list = HashMap :: new ( ) ;
116116
117117 // Global overrides from environment
118- // TODO: This need to come first
118+ // TODO: Change this so the env set global url always is first in the list of paths
119119 if let Some ( url) = env ( "SYSTEM_DEPS_BINARY_URL" ) {
120120 let checksum = env ( "SYSTEM_DEPS_BINARY_CHECKSUM" ) ;
121121 let pkg_paths = env ( "SYSTEM_DEPS_BINARY_PKG_PATHS" ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ fn find_by_path(mut dir: PathBuf) -> Option<PathBuf> {
5050/// Get the manifest from the project directory. This is **not** the directory
5151/// where `system-deps` is cloned, it should point to the top level `Cargo.toml`
5252/// file. This is needed to obtain metadata from all of dependencies, including
53- /// those upstream of the package being compiled.
53+ /// those downstream of the package being compiled.
5454///
5555/// If the target directory is not a subfolder of the project it will not be
5656/// possible to detect it automatically. In this case, the user will be asked
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ fn check_cfg(lit: &str) -> Option<bool> {
4040
4141/// Inserts values from b into a only if they don't already exist.
4242/// TODO: This function could be a lot cleaner and it needs better error handling.
43+ /// The logic for merging values needs to handle more cases so during testing this will have to be rewritten.
44+ /// Additionally, make sure that only downstream crates can override the metadata.
4345fn merge ( a : & mut Value , b : Value ) {
4446 match ( a, b) {
4547 ( a @ & mut Value :: Object ( _) , Value :: Object ( b) ) => {
@@ -66,7 +68,7 @@ fn merge(a: &mut Value, b: Value) {
6668}
6769
6870/// Recursively read dependency manifests to find metadata matching a key.
69- /// The matching metadata is aggregated in a list, with upstream crates having priority
71+ /// The matching metadata is aggregated in a list, with downstream crates having priority
7072/// for overwriting values. It will only read from the metadata sections matching the
7173/// provided key.
7274///
Original file line number Diff line number Diff line change @@ -934,9 +934,10 @@ impl Config {
934934 combined_pkg_config_path. extend_from_slice ( & pkg_config_path) ;
935935
936936 // should the lib be statically linked?
937- let statik = self
938- . env
939- . has_value ( & EnvVariable :: new_link ( Some ( name) ) , "static" )
937+ let statik = cfg ! ( feature = "binary" )
938+ || self
939+ . env
940+ . has_value ( & EnvVariable :: new_link ( Some ( name) ) , "static" )
940941 || self . env . has_value ( & EnvVariable :: new_link ( None ) , "static" ) ;
941942
942943 let mut library = if self . env . contains ( & EnvVariable :: new_no_pkg_config ( name) ) {
You can’t perform that action at this time.
0 commit comments