-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from nix-community/death-to-varlink
Remove varlink and bring back the native server/client socket serialization
- Loading branch information
Showing
37 changed files
with
1,763 additions
and
2,195 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "lorri" | |
# lorri uses a MAJOR.MINOR versioning scheme, see MAINTAINERS.md for details. | ||
# Cargo requires MAJOR.MINOR.PATCH. So we translate lorri's versioning scheme | ||
# to MAJOR.MINOR.0, i.e. the PATCH part is always zero. | ||
version = "1.3.1" # Format: MAJOR.MINOR.0 | ||
version = "1.4.0" # Format: MAJOR.MINOR.0 | ||
authors = [ | ||
"Graham Christensen <[email protected]>", | ||
"Profpatsch <[email protected]>" | ||
|
@@ -21,6 +21,9 @@ crossbeam-channel = "0.3.8" | |
nix = "0.20.0" | ||
regex = "1.4.3" | ||
tempfile = "3.1.0" | ||
anyhow = "1.0" | ||
thiserror = "1.0" | ||
|
||
# TODO: update to 0.3 | ||
structopt.version = "0.2" | ||
structopt.default-features = false | ||
|
@@ -38,11 +41,12 @@ structopt.features = [ | |
slog = "2.7.0" | ||
slog-scope = "4.3.0" | ||
slog-term = "2.5.0" | ||
fastrand = "1.4.0" | ||
# serialization | ||
serde = "1.0.88" | ||
serde_derive = "1.0.88" | ||
serde_json = "1.0.38" | ||
varlink = "10.0.0" | ||
bincode = "1.3.2" | ||
# nice-to-have | ||
ctrlc = { version = "3.1.8", features = ["termination"] } | ||
directories = "3.0.1" | ||
|
@@ -62,6 +66,3 @@ proptest.features = [ | |
# "fork", | ||
# "timeout" | ||
] | ||
|
||
[build-dependencies] | ||
varlink_generator = "9.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/src/cfg.rs b/src/cfg.rs | ||
index 56f76a0..54a49b0 100644 | ||
--- a/src/cfg.rs | ||
+++ b/src/cfg.rs | ||
@@ -40,6 +40,7 @@ pub fn to_nix(w: &mut Write, target: &[Cfg]) -> Result<(), Error> { | ||
|
||
fn to_nix_op(w: &mut Write, op: CfgOp, target: &[Cfg]) -> Result<(), Error> { | ||
let mut is_first = true; | ||
+ eprintln!("{:#?}", target); | ||
for cfg in target { | ||
if !is_first { | ||
match op { | ||
@@ -60,7 +61,11 @@ fn to_nix_op(w: &mut Write, op: CfgOp, target: &[Cfg]) -> Result<(), Error> { | ||
"target_os" => cfg_value(w, "kernel", value)?, | ||
"target_env" => cfg_value(w, "abi", value)?, | ||
"target_arch" => cfg_value(w, "cpu", value)?, | ||
- _ => return Err(CarnixError::CouldNotTranslateTarget.into()) | ||
+ _ => { | ||
+ eprintln!("target: {}", key); | ||
+ eprintln!("Do not understand this config op key: {}", key); | ||
+ write!(w, "true")?; | ||
+ } | ||
} | ||
}, | ||
Cfg::Cfg(ref value) => cfg_value(w, "kernel", value)?, |
Oops, something went wrong.