From ceef89c8cccce08a28e4acd3e9c7aa5e9a368309 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 18:44:44 +0200 Subject: [PATCH 01/10] add tracing An alternative logging library with support for structured logging as well as slightly nicer default output. --- Cargo.lock | 160 +++++++++++++++++++++++++++++++++++----------- ofborg/Cargo.toml | 4 +- 2 files changed, 123 insertions(+), 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b8dff8..400fc56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -96,6 +96,14 @@ dependencies = [ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "antidote" version = "1.0.0" @@ -384,15 +392,6 @@ dependencies = [ "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "env_logger" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "error-chain" version = "0.10.0" @@ -693,6 +692,14 @@ name = "maplit" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "regex-automata 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "matches" version = "0.1.8" @@ -903,13 +910,11 @@ dependencies = [ "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "hubcaps 0.3.16 (git+https://github.com/grahamc/hubcaps.git)", "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "lapin 1.0.0-beta3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -919,6 +924,8 @@ dependencies = [ "serde_json 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)", "sys-info 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-subscriber 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1180,14 +1187,22 @@ dependencies = [ [[package]] name = "regex" -version = "0.2.11" +version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-automata" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1197,11 +1212,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex-syntax" -version = "0.5.6" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "remove_dir_all" @@ -1325,6 +1337,14 @@ dependencies = [ "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sharded-slab" +version = "0.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "slab" version = "0.4.2" @@ -1433,7 +1453,7 @@ dependencies = [ [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1449,6 +1469,71 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tracing" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-attributes 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-log" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-serde" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matchers 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)", + "sharded-slab 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-log 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "traitobject" version = "0.1.0" @@ -1469,11 +1554,6 @@ name = "ucd-trie" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ucd-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "unicase" version = "1.4.2" @@ -1525,11 +1605,6 @@ name = "utf8-ranges" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "utf8-ranges" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "uuid" version = "0.4.0" @@ -1598,7 +1673,7 @@ dependencies = [ [metadata] "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" "checksum amq-proto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66d79639b71f74c7006c12683cc2ff221615a51a741688fa7798ccd080dc54d3" "checksum amq-protocol 6.0.0-rc2 (registry+https://github.com/rust-lang/crates.io-index)" = "92fc4b6b679c4078c6eb031bcc588852708c59d61baba14c4267963a9a8ccd4c" "checksum amq-protocol-codegen 6.0.0-rc2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3967869d2b1c655d82ffcdbc8f7f122075cc72bb2f3c468eada5514b2d9a2e2" @@ -1606,6 +1681,7 @@ dependencies = [ "checksum amq-protocol-types 6.0.0-rc2 (registry+https://github.com/rust-lang/crates.io-index)" = "111f266debc7afc9962e783d8aee36a4cdefebf6ae34f9e02954af2f611cccb8" "checksum amq-protocol-uri 6.0.0-rc2 (registry+https://github.com/rust-lang/crates.io-index)" = "a39076cb5440bc5f2b222f3d60fa08cee39f63f9e020180e28fa251da6d57e00" "checksum amqp 0.1.0 (git+https://github.com/grahamc/rust-amqp.git)" = "" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" "checksum async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" @@ -1643,7 +1719,6 @@ dependencies = [ "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" "checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f" -"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" "checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" @@ -1681,6 +1756,7 @@ dependencies = [ "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" "checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" +"checksum matchers 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "79c56d6a0b07f9e19282511c83fc5b086364cbae4ba8c7d5f190c3d9b0425a48" @@ -1733,9 +1809,10 @@ dependencies = [ "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" "checksum redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)" = "52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2" "checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" +"checksum regex-automata 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" "checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" "checksum ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" @@ -1751,6 +1828,7 @@ dependencies = [ "checksum serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" "checksum serde_json 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)" = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd" "checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +"checksum sharded-slab 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "06d5a3f5166fb5b42a5439f2eee8b9de149e235961e3eb21c5808fc3ea17ff3e" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" "checksum socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" @@ -1763,13 +1841,18 @@ dependencies = [ "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" "checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "847da467bf0db05882a9e2375934a8a55cffdc9db0d128af1518200260ba1f6c" +"checksum tracing 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1721cc8cf7d770cc4257872507180f35a4797272f5962f24c806af9e7faf52ab" +"checksum tracing-attributes 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b" +"checksum tracing-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715" +"checksum tracing-log 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9" +"checksum tracing-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6ccba2f8f16e0ed268fc765d9b7ff22e965e7185d32f8f1ec8294fe17d86e79" +"checksum tracing-subscriber 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d53c40489aa69c9aed21ff483f26886ca8403df33bdc2d2f87c60c1617826d2" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" "checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" -"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" @@ -1777,7 +1860,6 @@ dependencies = [ "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7cfec50b0842181ba6e713151b72f4ec84a6a7e2c9c8a8a3ffc37bb1cd16b231" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" diff --git a/ofborg/Cargo.toml b/ofborg/Cargo.toml index aaac11d..6108122 100644 --- a/ofborg/Cargo.toml +++ b/ofborg/Cargo.toml @@ -8,8 +8,6 @@ edition = "2018" [dependencies] either = "1.4.0" -log = "= 0.3.8" -env_logger = "= 0.4.3" # amqp = { path = "./rust-amqp/" } # for testing patches amqp = { git = "https://github.com/grahamc/rust-amqp.git" } md5 = "0.3.5" @@ -19,6 +17,8 @@ serde = "1.0" serde_derive = "1.0" serde_json = "1.0" tempfile = "2.2.0" +tracing = "0.1.13" +tracing-subscriber = "0.2.5" hubcaps = { git = "https://github.com/grahamc/hubcaps.git" } #hubcaps = { path = "../../../grahamc/hubcaps/" } # for testing patches hyper = "0.10.*" From a2e5dad97c58b2e469fffafd4388eed28ad57ae5 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 20:17:18 +0200 Subject: [PATCH 02/10] update carnix --- Cargo.nix | 87 ++++-- crates-io.list | 21 +- crates-io.nix | 758 +++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 713 insertions(+), 153 deletions(-) diff --git a/Cargo.nix b/Cargo.nix index ecbed9d..10c1aaf 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -120,13 +120,11 @@ rec { (cratesIO.crates."async_std"."${deps."ofborg"."0.1.9"."async_std"}" deps) (cratesIO.crates."chrono"."${deps."ofborg"."0.1.9"."chrono"}" deps) (cratesIO.crates."either"."${deps."ofborg"."0.1.9"."either"}" deps) - (cratesIO.crates."env_logger"."${deps."ofborg"."0.1.9"."env_logger"}" deps) (cratesIO.crates."fs2"."${deps."ofborg"."0.1.9"."fs2"}" deps) (crates."hubcaps"."${deps."ofborg"."0.1.9"."hubcaps"}" deps) (cratesIO.crates."hyper"."${deps."ofborg"."0.1.9"."hyper"}" deps) (cratesIO.crates."hyper_native_tls"."${deps."ofborg"."0.1.9"."hyper_native_tls"}" deps) (cratesIO.crates."lapin"."${deps."ofborg"."0.1.9"."lapin"}" deps) - (cratesIO.crates."log"."${deps."ofborg"."0.1.9"."log"}" deps) (cratesIO.crates."lru_cache"."${deps."ofborg"."0.1.9"."lru_cache"}" deps) (cratesIO.crates."md5"."${deps."ofborg"."0.1.9"."md5"}" deps) (cratesIO.crates."nom"."${deps."ofborg"."0.1.9"."nom"}" deps) @@ -136,6 +134,8 @@ rec { (cratesIO.crates."serde_json"."${deps."ofborg"."0.1.9"."serde_json"}" deps) (cratesIO.crates."sys_info"."${deps."ofborg"."0.1.9"."sys_info"}" deps) (cratesIO.crates."tempfile"."${deps."ofborg"."0.1.9"."tempfile"}" deps) + (cratesIO.crates."tracing"."${deps."ofborg"."0.1.9"."tracing"}" deps) + (cratesIO.crates."tracing_subscriber"."${deps."ofborg"."0.1.9"."tracing_subscriber"}" deps) (cratesIO.crates."uuid"."${deps."ofborg"."0.1.9"."uuid"}" deps) ]); }; @@ -144,13 +144,11 @@ rec { async_std."${deps.ofborg."0.1.9".async_std}".default = true; chrono."${deps.ofborg."0.1.9".chrono}".default = true; either."${deps.ofborg."0.1.9".either}".default = true; - env_logger."${deps.ofborg."0.1.9".env_logger}".default = true; fs2."${deps.ofborg."0.1.9".fs2}".default = true; hubcaps."${deps.ofborg."0.1.9".hubcaps}".default = true; hyper."${deps.ofborg."0.1.9".hyper}".default = true; hyper_native_tls."${deps.ofborg."0.1.9".hyper_native_tls}".default = true; lapin."${deps.ofborg."0.1.9".lapin}".default = true; - log."${deps.ofborg."0.1.9".log}".default = true; lru_cache."${deps.ofborg."0.1.9".lru_cache}".default = true; md5."${deps.ofborg."0.1.9".md5}".default = true; nom."${deps.ofborg."0.1.9".nom}".default = true; @@ -161,6 +159,8 @@ rec { serde_json."${deps.ofborg."0.1.9".serde_json}".default = true; sys_info."${deps.ofborg."0.1.9".sys_info}".default = true; tempfile."${deps.ofborg."0.1.9".tempfile}".default = true; + tracing."${deps.ofborg."0.1.9".tracing}".default = true; + tracing_subscriber."${deps.ofborg."0.1.9".tracing_subscriber}".default = true; uuid = fold recursiveUpdate {} [ { "${deps.ofborg."0.1.9".uuid}"."v4" = true; } { "${deps.ofborg."0.1.9".uuid}".default = true; } @@ -170,13 +170,11 @@ rec { (cratesIO.features_.async_std."${deps."ofborg"."0.1.9"."async_std"}" deps) (cratesIO.features_.chrono."${deps."ofborg"."0.1.9"."chrono"}" deps) (cratesIO.features_.either."${deps."ofborg"."0.1.9"."either"}" deps) - (cratesIO.features_.env_logger."${deps."ofborg"."0.1.9"."env_logger"}" deps) (cratesIO.features_.fs2."${deps."ofborg"."0.1.9"."fs2"}" deps) (features_.hubcaps."${deps."ofborg"."0.1.9"."hubcaps"}" deps) (cratesIO.features_.hyper."${deps."ofborg"."0.1.9"."hyper"}" deps) (cratesIO.features_.hyper_native_tls."${deps."ofborg"."0.1.9"."hyper_native_tls"}" deps) (cratesIO.features_.lapin."${deps."ofborg"."0.1.9"."lapin"}" deps) - (cratesIO.features_.log."${deps."ofborg"."0.1.9"."log"}" deps) (cratesIO.features_.lru_cache."${deps."ofborg"."0.1.9"."lru_cache"}" deps) (cratesIO.features_.md5."${deps."ofborg"."0.1.9"."md5"}" deps) (cratesIO.features_.nom."${deps."ofborg"."0.1.9"."nom"}" deps) @@ -186,6 +184,8 @@ rec { (cratesIO.features_.serde_json."${deps."ofborg"."0.1.9"."serde_json"}" deps) (cratesIO.features_.sys_info."${deps."ofborg"."0.1.9"."sys_info"}" deps) (cratesIO.features_.tempfile."${deps."ofborg"."0.1.9"."tempfile"}" deps) + (cratesIO.features_.tracing."${deps."ofborg"."0.1.9"."tracing"}" deps) + (cratesIO.features_.tracing_subscriber."${deps."ofborg"."0.1.9"."tracing_subscriber"}" deps) (cratesIO.features_.uuid."${deps."ofborg"."0.1.9"."uuid"}" deps) ]; @@ -225,7 +225,7 @@ rec { deps.aho_corasick."0.5.3" = { memchr = "0.1.11"; }; - deps.aho_corasick."0.6.9" = { + deps.aho_corasick."0.7.10" = { memchr = "2.3.3"; }; deps.amq_proto."0.1.0" = { @@ -273,6 +273,9 @@ rec { time = "0.1.41"; url = "1.7.2"; }; + deps.ansi_term."0.11.0" = { + winapi = "0.3.8"; + }; deps.antidote."1.0.0" = {}; deps.arrayvec."0.5.1" = {}; deps.async_std."1.5.0" = { @@ -393,10 +396,6 @@ rec { log = "0.3.8"; regex = "0.1.80"; }; - deps.env_logger."0.4.3" = { - log = "0.3.8"; - regex = "0.2.11"; - }; deps.error_chain."0.10.0" = { backtrace = "0.3.13"; }; @@ -527,6 +526,9 @@ rec { linked_hash_map = "0.4.2"; }; deps.maplit."1.0.2" = {}; + deps.matchers."0.0.1" = { + regex_automata = "0.1.9"; + }; deps.matches."0.1.8" = {}; deps.maybe_uninit."2.0.0" = {}; deps.md5."0.3.8" = {}; @@ -629,13 +631,11 @@ rec { async_std = "1.5.0"; chrono = "0.4.6"; either = "1.5.0"; - env_logger = "0.4.3"; fs2 = "0.4.3"; hubcaps = "0.3.16"; hyper = "0.10.15"; hyper_native_tls = "0.2.4"; lapin = "1.0.0-beta3"; - log = "0.3.8"; lru_cache = "0.1.1"; md5 = "0.3.8"; nom = "4.1.1"; @@ -645,6 +645,8 @@ rec { serde_json = "1.0.52"; sys_info = "0.5.6"; tempfile = "2.2.0"; + tracing = "0.1.13"; + tracing_subscriber = "0.2.5"; uuid = "0.4.0"; }; deps.ofborg_simple_build."0.1.0" = { @@ -758,17 +760,18 @@ rec { thread_local = "0.2.7"; utf8_ranges = "0.1.3"; }; - deps.regex."0.2.11" = { - aho_corasick = "0.6.9"; + deps.regex."1.3.7" = { + aho_corasick = "0.7.10"; memchr = "2.3.3"; - regex_syntax = "0.5.6"; - thread_local = "0.3.6"; - utf8_ranges = "1.0.2"; + regex_syntax = "0.6.17"; + thread_local = "1.0.1"; + }; + deps.regex_automata."0.1.9" = { + byteorder = "1.2.7"; + regex_syntax = "0.6.17"; }; deps.regex_syntax."0.3.9" = {}; - deps.regex_syntax."0.5.6" = { - ucd_util = "0.1.3"; - }; + deps.regex_syntax."0.6.17" = {}; deps.remove_dir_all."0.5.1" = { winapi = "0.3.8"; }; @@ -821,6 +824,9 @@ rec { fake_simd = "0.1.2"; opaque_debug = "0.2.3"; }; + deps.sharded_slab."0.0.9" = { + lazy_static = "1.4.0"; + }; deps.slab."0.4.2" = {}; deps.smallvec."1.4.0" = {}; deps.socket2."0.3.12" = { @@ -870,7 +876,7 @@ rec { deps.thread_local."0.2.7" = { thread_id = "2.0.0"; }; - deps.thread_local."0.3.6" = { + deps.thread_local."1.0.1" = { lazy_static = "1.4.0"; }; deps.time."0.1.41" = { @@ -878,11 +884,45 @@ rec { redox_syscall = "0.1.50"; winapi = "0.3.8"; }; + deps.tracing."0.1.13" = { + cfg_if = "0.1.10"; + tracing_attributes = "0.1.7"; + tracing_core = "0.1.10"; + }; + deps.tracing_attributes."0.1.7" = { + quote = "1.0.3"; + syn = "1.0.18"; + }; + deps.tracing_core."0.1.10" = { + lazy_static = "1.4.0"; + }; + deps.tracing_log."0.1.1" = { + lazy_static = "1.4.0"; + log = "0.4.8"; + tracing_core = "0.1.10"; + }; + deps.tracing_serde."0.1.1" = { + serde = "1.0.106"; + tracing_core = "0.1.10"; + }; + deps.tracing_subscriber."0.2.5" = { + ansi_term = "0.11.0"; + chrono = "0.4.6"; + lazy_static = "1.4.0"; + matchers = "0.0.1"; + regex = "1.3.7"; + serde = "1.0.106"; + serde_json = "1.0.52"; + sharded_slab = "0.0.9"; + smallvec = "1.4.0"; + tracing_core = "0.1.10"; + tracing_log = "0.1.1"; + tracing_serde = "0.1.1"; + }; deps.traitobject."0.1.0" = {}; deps.typeable."0.1.2" = {}; deps.typenum."1.12.0" = {}; deps.ucd_trie."0.1.3" = {}; - deps.ucd_util."0.1.3" = {}; deps.unicase."1.4.2" = { version_check = "0.1.5"; }; @@ -902,7 +942,6 @@ rec { percent_encoding = "2.1.0"; }; deps.utf8_ranges."0.1.3" = {}; - deps.utf8_ranges."1.0.2" = {}; deps.uuid."0.4.0" = { rand = "0.3.22"; }; diff --git a/crates-io.list b/crates-io.list index b0ed606..b41e341 100644 --- a/crates-io.list +++ b/crates-io.list @@ -1,11 +1,12 @@ aho-corasick-0.5.3 -aho-corasick-0.6.9 +aho-corasick-0.7.10 amq-proto-0.1.0 amq-protocol-6.0.0-rc2 amq-protocol-codegen-6.0.0-rc2 amq-protocol-tcp-6.0.0-rc2 amq-protocol-types-6.0.0-rc2 amq-protocol-uri-6.0.0-rc2 +ansi_term-0.11.0 antidote-1.0.0 arrayvec-0.5.1 async-std-1.5.0 @@ -43,7 +44,6 @@ doc-comment-0.3.3 either-1.5.0 enum_primitive-0.1.1 env_logger-0.3.5 -env_logger-0.4.3 error-chain-0.10.0 fake-simd-0.1.2 foreign-types-0.3.2 @@ -80,6 +80,7 @@ log-0.3.8 log-0.4.8 lru-cache-0.1.1 maplit-1.0.2 +matchers-0.0.1 matches-0.1.8 maybe-uninit-2.0.0 md5-0.3.8 @@ -132,9 +133,10 @@ rand_core-0.5.1 rand_hc-0.2.0 redox_syscall-0.1.50 regex-0.1.80 -regex-0.2.11 +regex-1.3.7 +regex-automata-0.1.9 regex-syntax-0.3.9 -regex-syntax-0.5.6 +regex-syntax-0.6.17 remove_dir_all-0.5.1 rustc-demangle-0.1.13 ryu-1.0.4 @@ -150,6 +152,7 @@ serde-1.0.106 serde_derive-1.0.106 serde_json-1.0.52 sha-1-0.8.2 +sharded-slab-0.0.9 slab-0.4.2 smallvec-1.4.0 socket2-0.3.12 @@ -162,13 +165,18 @@ tempfile-2.2.0 tempfile-3.1.0 thread-id-2.0.0 thread_local-0.2.7 -thread_local-0.3.6 +thread_local-1.0.1 time-0.1.41 +tracing-0.1.13 +tracing-attributes-0.1.7 +tracing-core-0.1.10 +tracing-log-0.1.1 +tracing-serde-0.1.1 +tracing-subscriber-0.2.5 traitobject-0.1.0 typeable-0.1.2 typenum-1.12.0 ucd-trie-0.1.3 -ucd-util-0.1.3 unicase-1.4.2 unicode-bidi-0.3.4 unicode-normalization-0.1.7 @@ -176,7 +184,6 @@ unicode-xid-0.2.0 url-1.7.2 url-2.1.1 utf8-ranges-0.1.3 -utf8-ranges-1.0.2 uuid-0.4.0 vcpkg-0.2.8 version_check-0.1.5 diff --git a/crates-io.nix b/crates-io.nix index de820e0..aef52a8 100644 --- a/crates-io.nix +++ b/crates-io.nix @@ -29,26 +29,37 @@ rec { # end -# aho-corasick-0.6.9 +# aho-corasick-0.7.10 - crates.aho_corasick."0.6.9" = deps: { features?(features_.aho_corasick."0.6.9" deps {}) }: buildRustCrate { + crates.aho_corasick."0.7.10" = deps: { features?(features_.aho_corasick."0.7.10" deps {}) }: buildRustCrate { crateName = "aho-corasick"; - version = "0.6.9"; - description = "Fast multiple substring searching with finite state machines."; + version = "0.7.10"; + description = "Fast multiple substring searching."; authors = [ "Andrew Gallant " ]; - sha256 = "1lj20py6bvw3y7m9n2nqh0mkshfl1kjfp72lfika9gpkrp2r204l"; + sha256 = "0mmhg2dsz8b2iphdhdx24kzgr2ga9p879w30y1529kcsqv26mfwv"; libName = "aho_corasick"; - crateBin = - [{ name = "aho-corasick-dot"; path = "src/main.rs"; }]; dependencies = mapFeatures features ([ - (crates."memchr"."${deps."aho_corasick"."0.6.9"."memchr"}" deps) + (crates."memchr"."${deps."aho_corasick"."0.7.10"."memchr"}" deps) ]); + features = mkFeatures (features."aho_corasick"."0.7.10" or {}); }; - features_.aho_corasick."0.6.9" = deps: f: updateFeatures f (rec { - aho_corasick."0.6.9".default = (f.aho_corasick."0.6.9".default or true); - memchr."${deps.aho_corasick."0.6.9".memchr}".default = true; + features_.aho_corasick."0.7.10" = deps: f: updateFeatures f (rec { + aho_corasick = fold recursiveUpdate {} [ + { "0.7.10"."std" = + (f.aho_corasick."0.7.10"."std" or false) || + (f.aho_corasick."0.7.10".default or false) || + (aho_corasick."0.7.10"."default" or false); } + { "0.7.10".default = (f.aho_corasick."0.7.10".default or true); } + ]; + memchr = fold recursiveUpdate {} [ + { "${deps.aho_corasick."0.7.10".memchr}"."use_std" = + (f.memchr."${deps.aho_corasick."0.7.10".memchr}"."use_std" or false) || + (aho_corasick."0.7.10"."std" or false) || + (f."aho_corasick"."0.7.10"."std" or false); } + { "${deps.aho_corasick."0.7.10".memchr}".default = (f.memchr."${deps.aho_corasick."0.7.10".memchr}".default or false); } + ]; }) [ - (features_.memchr."${deps."aho_corasick"."0.6.9"."memchr"}" deps) + (features_.memchr."${deps."aho_corasick"."0.7.10"."memchr"}" deps) ]; @@ -350,6 +361,32 @@ rec { ]; +# end +# ansi_term-0.11.0 + + crates.ansi_term."0.11.0" = deps: { features?(features_.ansi_term."0.11.0" deps {}) }: buildRustCrate { + crateName = "ansi_term"; + version = "0.11.0"; + description = "Library for ANSI terminal colours and styles (bold, underline)"; + authors = [ "ogham@bsago.me" "Ryan Scheel (Havvy) " "Josh Triplett " ]; + sha256 = "08fk0p2xvkqpmz3zlrwnf6l8sj2vngw464rvzspzp31sbgxbwm4v"; + dependencies = (if kernel == "windows" then mapFeatures features ([ + (crates."winapi"."${deps."ansi_term"."0.11.0"."winapi"}" deps) + ]) else []); + }; + features_.ansi_term."0.11.0" = deps: f: updateFeatures f (rec { + ansi_term."0.11.0".default = (f.ansi_term."0.11.0".default or true); + winapi = fold recursiveUpdate {} [ + { "${deps.ansi_term."0.11.0".winapi}"."consoleapi" = true; } + { "${deps.ansi_term."0.11.0".winapi}"."errhandlingapi" = true; } + { "${deps.ansi_term."0.11.0".winapi}"."processenv" = true; } + { "${deps.ansi_term."0.11.0".winapi}".default = true; } + ]; + }) [ + (features_.winapi."${deps."ansi_term"."0.11.0"."winapi"}" deps) + ]; + + # end # antidote-1.0.0 @@ -1533,37 +1570,6 @@ rec { ]; -# end -# env_logger-0.4.3 - - crates.env_logger."0.4.3" = deps: { features?(features_.env_logger."0.4.3" deps {}) }: buildRustCrate { - crateName = "env_logger"; - version = "0.4.3"; - description = "A logging implementation for `log` which is configured via an environment\nvariable.\n"; - authors = [ "The Rust Project Developers" ]; - sha256 = "0nrx04p4xa86d5kc7aq4fwvipbqji9cmgy449h47nc9f1chafhgg"; - dependencies = mapFeatures features ([ - (crates."log"."${deps."env_logger"."0.4.3"."log"}" deps) - ] - ++ (if features.env_logger."0.4.3".regex or false then [ (crates.regex."${deps."env_logger"."0.4.3".regex}" deps) ] else [])); - features = mkFeatures (features."env_logger"."0.4.3" or {}); - }; - features_.env_logger."0.4.3" = deps: f: updateFeatures f (rec { - env_logger = fold recursiveUpdate {} [ - { "0.4.3"."regex" = - (f.env_logger."0.4.3"."regex" or false) || - (f.env_logger."0.4.3".default or false) || - (env_logger."0.4.3"."default" or false); } - { "0.4.3".default = (f.env_logger."0.4.3".default or true); } - ]; - log."${deps.env_logger."0.4.3".log}".default = true; - regex."${deps.env_logger."0.4.3".regex}".default = true; - }) [ - (features_.log."${deps."env_logger"."0.4.3"."log"}" deps) - (features_.regex."${deps."env_logger"."0.4.3"."regex"}" deps) - ]; - - # end # error-chain-0.10.0 @@ -2654,6 +2660,28 @@ rec { }) []; +# end +# matchers-0.0.1 + + crates.matchers."0.0.1" = deps: { features?(features_.matchers."0.0.1" deps {}) }: buildRustCrate { + crateName = "matchers"; + version = "0.0.1"; + description = "Regex matching on character and byte streams.\n"; + authors = [ "Eliza Weisman " ]; + edition = "2018"; + sha256 = "1m734m00rv8fgfhvvdqidaz30ihyhnrd8xz115vvk8wx6b0ll9vf"; + dependencies = mapFeatures features ([ + (crates."regex_automata"."${deps."matchers"."0.0.1"."regex_automata"}" deps) + ]); + }; + features_.matchers."0.0.1" = deps: f: updateFeatures f (rec { + matchers."0.0.1".default = (f.matchers."0.0.1".default or true); + regex_automata."${deps.matchers."0.0.1".regex_automata}".default = true; + }) [ + (features_.regex_automata."${deps."matchers"."0.0.1"."regex_automata"}" deps) + ]; + + # end # matches-0.1.8 @@ -4382,42 +4410,188 @@ rec { # end -# regex-0.2.11 +# regex-1.3.7 - crates.regex."0.2.11" = deps: { features?(features_.regex."0.2.11" deps {}) }: buildRustCrate { + crates.regex."1.3.7" = deps: { features?(features_.regex."1.3.7" deps {}) }: buildRustCrate { crateName = "regex"; - version = "0.2.11"; + version = "1.3.7"; description = "An implementation of regular expressions for Rust. This implementation uses\nfinite automata and guarantees linear time matching on all inputs.\n"; authors = [ "The Rust Project Developers" ]; - sha256 = "0r50cymxdqp0fv1dxd22mjr6y32q450nwacd279p9s7lh0cafijj"; + sha256 = "0j3r3g0g1idd5blgjnwf1ysrpslmg4xbli2nvxydkwwcmghap7si"; dependencies = mapFeatures features ([ - (crates."aho_corasick"."${deps."regex"."0.2.11"."aho_corasick"}" deps) - (crates."memchr"."${deps."regex"."0.2.11"."memchr"}" deps) - (crates."regex_syntax"."${deps."regex"."0.2.11"."regex_syntax"}" deps) - (crates."thread_local"."${deps."regex"."0.2.11"."thread_local"}" deps) - (crates."utf8_ranges"."${deps."regex"."0.2.11"."utf8_ranges"}" deps) - ]); - features = mkFeatures (features."regex"."0.2.11" or {}); + (crates."regex_syntax"."${deps."regex"."1.3.7"."regex_syntax"}" deps) + ] + ++ (if features.regex."1.3.7".aho-corasick or false then [ (crates.aho_corasick."${deps."regex"."1.3.7".aho_corasick}" deps) ] else []) + ++ (if features.regex."1.3.7".memchr or false then [ (crates.memchr."${deps."regex"."1.3.7".memchr}" deps) ] else []) + ++ (if features.regex."1.3.7".thread_local or false then [ (crates.thread_local."${deps."regex"."1.3.7".thread_local}" deps) ] else [])); + features = mkFeatures (features."regex"."1.3.7" or {}); }; - features_.regex."0.2.11" = deps: f: updateFeatures f (rec { - aho_corasick."${deps.regex."0.2.11".aho_corasick}".default = true; - memchr."${deps.regex."0.2.11".memchr}".default = true; + features_.regex."1.3.7" = deps: f: updateFeatures f (rec { + aho_corasick."${deps.regex."1.3.7".aho_corasick}".default = true; + memchr."${deps.regex."1.3.7".memchr}".default = true; regex = fold recursiveUpdate {} [ - { "0.2.11"."pattern" = - (f.regex."0.2.11"."pattern" or false) || - (f.regex."0.2.11".unstable or false) || - (regex."0.2.11"."unstable" or false); } - { "0.2.11".default = (f.regex."0.2.11".default or true); } + { "1.3.7"."aho-corasick" = + (f.regex."1.3.7"."aho-corasick" or false) || + (f.regex."1.3.7".perf-literal or false) || + (regex."1.3.7"."perf-literal" or false); } + { "1.3.7"."memchr" = + (f.regex."1.3.7"."memchr" or false) || + (f.regex."1.3.7".perf-literal or false) || + (regex."1.3.7"."perf-literal" or false); } + { "1.3.7"."pattern" = + (f.regex."1.3.7"."pattern" or false) || + (f.regex."1.3.7".unstable or false) || + (regex."1.3.7"."unstable" or false); } + { "1.3.7"."perf" = + (f.regex."1.3.7"."perf" or false) || + (f.regex."1.3.7".default or false) || + (regex."1.3.7"."default" or false); } + { "1.3.7"."perf-cache" = + (f.regex."1.3.7"."perf-cache" or false) || + (f.regex."1.3.7".perf or false) || + (regex."1.3.7"."perf" or false); } + { "1.3.7"."perf-dfa" = + (f.regex."1.3.7"."perf-dfa" or false) || + (f.regex."1.3.7".perf or false) || + (regex."1.3.7"."perf" or false); } + { "1.3.7"."perf-inline" = + (f.regex."1.3.7"."perf-inline" or false) || + (f.regex."1.3.7".perf or false) || + (regex."1.3.7"."perf" or false); } + { "1.3.7"."perf-literal" = + (f.regex."1.3.7"."perf-literal" or false) || + (f.regex."1.3.7".perf or false) || + (regex."1.3.7"."perf" or false); } + { "1.3.7"."std" = + (f.regex."1.3.7"."std" or false) || + (f.regex."1.3.7".default or false) || + (regex."1.3.7"."default" or false) || + (f.regex."1.3.7".use_std or false) || + (regex."1.3.7"."use_std" or false); } + { "1.3.7"."thread_local" = + (f.regex."1.3.7"."thread_local" or false) || + (f.regex."1.3.7".perf-cache or false) || + (regex."1.3.7"."perf-cache" or false); } + { "1.3.7"."unicode" = + (f.regex."1.3.7"."unicode" or false) || + (f.regex."1.3.7".default or false) || + (regex."1.3.7"."default" or false); } + { "1.3.7"."unicode-age" = + (f.regex."1.3.7"."unicode-age" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7"."unicode-bool" = + (f.regex."1.3.7"."unicode-bool" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7"."unicode-case" = + (f.regex."1.3.7"."unicode-case" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7"."unicode-gencat" = + (f.regex."1.3.7"."unicode-gencat" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7"."unicode-perl" = + (f.regex."1.3.7"."unicode-perl" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7"."unicode-script" = + (f.regex."1.3.7"."unicode-script" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7"."unicode-segment" = + (f.regex."1.3.7"."unicode-segment" or false) || + (f.regex."1.3.7".unicode or false) || + (regex."1.3.7"."unicode" or false); } + { "1.3.7".default = (f.regex."1.3.7".default or true); } ]; - regex_syntax."${deps.regex."0.2.11".regex_syntax}".default = true; - thread_local."${deps.regex."0.2.11".thread_local}".default = true; - utf8_ranges."${deps.regex."0.2.11".utf8_ranges}".default = true; + regex_syntax = fold recursiveUpdate {} [ + { "${deps.regex."1.3.7".regex_syntax}"."default" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."default" or false) || + (regex."1.3.7"."default" or false) || + (f."regex"."1.3.7"."default" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode" or false) || + (regex."1.3.7"."unicode" or false) || + (f."regex"."1.3.7"."unicode" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-age" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-age" or false) || + (regex."1.3.7"."unicode-age" or false) || + (f."regex"."1.3.7"."unicode-age" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-bool" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-bool" or false) || + (regex."1.3.7"."unicode-bool" or false) || + (f."regex"."1.3.7"."unicode-bool" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-case" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-case" or false) || + (regex."1.3.7"."unicode-case" or false) || + (f."regex"."1.3.7"."unicode-case" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-gencat" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-gencat" or false) || + (regex."1.3.7"."unicode-gencat" or false) || + (f."regex"."1.3.7"."unicode-gencat" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-perl" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-perl" or false) || + (regex."1.3.7"."unicode-perl" or false) || + (f."regex"."1.3.7"."unicode-perl" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-script" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-script" or false) || + (regex."1.3.7"."unicode-script" or false) || + (f."regex"."1.3.7"."unicode-script" or false); } + { "${deps.regex."1.3.7".regex_syntax}"."unicode-segment" = + (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}"."unicode-segment" or false) || + (regex."1.3.7"."unicode-segment" or false) || + (f."regex"."1.3.7"."unicode-segment" or false); } + { "${deps.regex."1.3.7".regex_syntax}".default = (f.regex_syntax."${deps.regex."1.3.7".regex_syntax}".default or false); } + ]; + thread_local."${deps.regex."1.3.7".thread_local}".default = true; }) [ - (features_.aho_corasick."${deps."regex"."0.2.11"."aho_corasick"}" deps) - (features_.memchr."${deps."regex"."0.2.11"."memchr"}" deps) - (features_.regex_syntax."${deps."regex"."0.2.11"."regex_syntax"}" deps) - (features_.thread_local."${deps."regex"."0.2.11"."thread_local"}" deps) - (features_.utf8_ranges."${deps."regex"."0.2.11"."utf8_ranges"}" deps) + (features_.aho_corasick."${deps."regex"."1.3.7"."aho_corasick"}" deps) + (features_.memchr."${deps."regex"."1.3.7"."memchr"}" deps) + (features_.regex_syntax."${deps."regex"."1.3.7"."regex_syntax"}" deps) + (features_.thread_local."${deps."regex"."1.3.7"."thread_local"}" deps) + ]; + + +# end +# regex-automata-0.1.9 + + crates.regex_automata."0.1.9" = deps: { features?(features_.regex_automata."0.1.9" deps {}) }: buildRustCrate { + crateName = "regex-automata"; + version = "0.1.9"; + description = "Automata construction and matching using regular expressions."; + authors = [ "Andrew Gallant " ]; + sha256 = "12rllq44ynv1051kj655qi0jmcdlc47qd5mcxkg8ir0w13gx0m2g"; + dependencies = mapFeatures features ([ + (crates."byteorder"."${deps."regex_automata"."0.1.9"."byteorder"}" deps) + ] + ++ (if features.regex_automata."0.1.9".regex-syntax or false then [ (crates.regex_syntax."${deps."regex_automata"."0.1.9".regex_syntax}" deps) ] else [])); + features = mkFeatures (features."regex_automata"."0.1.9" or {}); + }; + features_.regex_automata."0.1.9" = deps: f: updateFeatures f (rec { + byteorder."${deps.regex_automata."0.1.9".byteorder}".default = (f.byteorder."${deps.regex_automata."0.1.9".byteorder}".default or false); + regex_automata = fold recursiveUpdate {} [ + { "0.1.9"."fst" = + (f.regex_automata."0.1.9"."fst" or false) || + (f.regex_automata."0.1.9".transducer or false) || + (regex_automata."0.1.9"."transducer" or false); } + { "0.1.9"."regex-syntax" = + (f.regex_automata."0.1.9"."regex-syntax" or false) || + (f.regex_automata."0.1.9".std or false) || + (regex_automata."0.1.9"."std" or false); } + { "0.1.9"."std" = + (f.regex_automata."0.1.9"."std" or false) || + (f.regex_automata."0.1.9".default or false) || + (regex_automata."0.1.9"."default" or false) || + (f.regex_automata."0.1.9".transducer or false) || + (regex_automata."0.1.9"."transducer" or false); } + { "0.1.9".default = (f.regex_automata."0.1.9".default or true); } + ]; + regex_syntax."${deps.regex_automata."0.1.9".regex_syntax}".default = true; + }) [ + (features_.byteorder."${deps."regex_automata"."0.1.9"."byteorder"}" deps) + (features_.regex_syntax."${deps."regex_automata"."0.1.9"."regex_syntax"}" deps) ]; @@ -4437,24 +4611,53 @@ rec { # end -# regex-syntax-0.5.6 +# regex-syntax-0.6.17 - crates.regex_syntax."0.5.6" = deps: { features?(features_.regex_syntax."0.5.6" deps {}) }: buildRustCrate { + crates.regex_syntax."0.6.17" = deps: { features?(features_.regex_syntax."0.6.17" deps {}) }: buildRustCrate { crateName = "regex-syntax"; - version = "0.5.6"; + version = "0.6.17"; description = "A regular expression parser."; authors = [ "The Rust Project Developers" ]; - sha256 = "10vf3r34bgjnbrnqd5aszn35bjvm8insw498l1vjy8zx5yms3427"; - dependencies = mapFeatures features ([ - (crates."ucd_util"."${deps."regex_syntax"."0.5.6"."ucd_util"}" deps) - ]); + sha256 = "0jvwz9bfycw52mf0djnmvwzx6v3jcvcwaz0zf9ikajrl00ahfx3a"; + features = mkFeatures (features."regex_syntax"."0.6.17" or {}); }; - features_.regex_syntax."0.5.6" = deps: f: updateFeatures f (rec { - regex_syntax."0.5.6".default = (f.regex_syntax."0.5.6".default or true); - ucd_util."${deps.regex_syntax."0.5.6".ucd_util}".default = true; - }) [ - (features_.ucd_util."${deps."regex_syntax"."0.5.6"."ucd_util"}" deps) - ]; + features_.regex_syntax."0.6.17" = deps: f: updateFeatures f (rec { + regex_syntax = fold recursiveUpdate {} [ + { "0.6.17"."unicode" = + (f.regex_syntax."0.6.17"."unicode" or false) || + (f.regex_syntax."0.6.17".default or false) || + (regex_syntax."0.6.17"."default" or false); } + { "0.6.17"."unicode-age" = + (f.regex_syntax."0.6.17"."unicode-age" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17"."unicode-bool" = + (f.regex_syntax."0.6.17"."unicode-bool" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17"."unicode-case" = + (f.regex_syntax."0.6.17"."unicode-case" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17"."unicode-gencat" = + (f.regex_syntax."0.6.17"."unicode-gencat" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17"."unicode-perl" = + (f.regex_syntax."0.6.17"."unicode-perl" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17"."unicode-script" = + (f.regex_syntax."0.6.17"."unicode-script" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17"."unicode-segment" = + (f.regex_syntax."0.6.17"."unicode-segment" or false) || + (f.regex_syntax."0.6.17".unicode or false) || + (regex_syntax."0.6.17"."unicode" or false); } + { "0.6.17".default = (f.regex_syntax."0.6.17".default or true); } + ]; + }) []; # end @@ -5023,6 +5226,28 @@ rec { ]; +# end +# sharded-slab-0.0.9 + + crates.sharded_slab."0.0.9" = deps: { features?(features_.sharded_slab."0.0.9" deps {}) }: buildRustCrate { + crateName = "sharded-slab"; + version = "0.0.9"; + description = "A lock-free concurrent slab.\n"; + authors = [ "Eliza Weisman " ]; + edition = "2018"; + sha256 = "1xcbb732gv1k0djh1sjf84qw52xnawi2605pnpnfrd8vy4r8inwf"; + dependencies = mapFeatures features ([ + (crates."lazy_static"."${deps."sharded_slab"."0.0.9"."lazy_static"}" deps) + ]); + }; + features_.sharded_slab."0.0.9" = deps: f: updateFeatures f (rec { + lazy_static."${deps.sharded_slab."0.0.9".lazy_static}".default = true; + sharded_slab."0.0.9".default = (f.sharded_slab."0.0.9".default or true); + }) [ + (features_.lazy_static."${deps."sharded_slab"."0.0.9"."lazy_static"}" deps) + ]; + + # end # slab-0.4.2 @@ -5421,23 +5646,23 @@ rec { # end -# thread_local-0.3.6 +# thread_local-1.0.1 - crates.thread_local."0.3.6" = deps: { features?(features_.thread_local."0.3.6" deps {}) }: buildRustCrate { + crates.thread_local."1.0.1" = deps: { features?(features_.thread_local."1.0.1" deps {}) }: buildRustCrate { crateName = "thread_local"; - version = "0.3.6"; + version = "1.0.1"; description = "Per-object thread-local storage"; authors = [ "Amanieu d'Antras " ]; - sha256 = "02rksdwjmz2pw9bmgbb4c0bgkbq5z6nvg510sq1s6y2j1gam0c7i"; + sha256 = "0vs440x0nwpsw30ks6b8f70178y0gl7zhrqydhjykrhn56bj57h7"; dependencies = mapFeatures features ([ - (crates."lazy_static"."${deps."thread_local"."0.3.6"."lazy_static"}" deps) + (crates."lazy_static"."${deps."thread_local"."1.0.1"."lazy_static"}" deps) ]); }; - features_.thread_local."0.3.6" = deps: f: updateFeatures f (rec { - lazy_static."${deps.thread_local."0.3.6".lazy_static}".default = true; - thread_local."0.3.6".default = (f.thread_local."0.3.6".default or true); + features_.thread_local."1.0.1" = deps: f: updateFeatures f (rec { + lazy_static."${deps.thread_local."1.0.1".lazy_static}".default = true; + thread_local."1.0.1".default = (f.thread_local."1.0.1".default or true); }) [ - (features_.lazy_static."${deps."thread_local"."0.3.6"."lazy_static"}" deps) + (features_.lazy_static."${deps."thread_local"."1.0.1"."lazy_static"}" deps) ]; @@ -5481,6 +5706,325 @@ rec { ]; +# end +# tracing-0.1.13 + + crates.tracing."0.1.13" = deps: { features?(features_.tracing."0.1.13" deps {}) }: buildRustCrate { + crateName = "tracing"; + version = "0.1.13"; + description = "Application-level tracing for Rust.\n"; + authors = [ "Eliza Weisman " "Tokio Contributors " ]; + edition = "2018"; + sha256 = "0rb6mvfp9pkzrrjxc5mgxac4hgn255fk5i3pq6915xsf1qpl7n6j"; + dependencies = mapFeatures features ([ + (crates."cfg_if"."${deps."tracing"."0.1.13"."cfg_if"}" deps) + (crates."tracing_core"."${deps."tracing"."0.1.13"."tracing_core"}" deps) + ] + ++ (if features.tracing."0.1.13".tracing-attributes or false then [ (crates.tracing_attributes."${deps."tracing"."0.1.13".tracing_attributes}" deps) ] else [])); + features = mkFeatures (features."tracing"."0.1.13" or {}); + }; + features_.tracing."0.1.13" = deps: f: updateFeatures f (rec { + cfg_if."${deps.tracing."0.1.13".cfg_if}".default = true; + tracing = fold recursiveUpdate {} [ + { "0.1.13"."attributes" = + (f.tracing."0.1.13"."attributes" or false) || + (f.tracing."0.1.13".default or false) || + (tracing."0.1.13"."default" or false); } + { "0.1.13"."log" = + (f.tracing."0.1.13"."log" or false) || + (f.tracing."0.1.13".log-always or false) || + (tracing."0.1.13"."log-always" or false); } + { "0.1.13"."std" = + (f.tracing."0.1.13"."std" or false) || + (f.tracing."0.1.13".default or false) || + (tracing."0.1.13"."default" or false); } + { "0.1.13"."tracing-attributes" = + (f.tracing."0.1.13"."tracing-attributes" or false) || + (f.tracing."0.1.13".attributes or false) || + (tracing."0.1.13"."attributes" or false); } + { "0.1.13".default = (f.tracing."0.1.13".default or true); } + ]; + tracing_attributes."${deps.tracing."0.1.13".tracing_attributes}".default = true; + tracing_core = fold recursiveUpdate {} [ + { "${deps.tracing."0.1.13".tracing_core}"."std" = + (f.tracing_core."${deps.tracing."0.1.13".tracing_core}"."std" or false) || + (tracing."0.1.13"."std" or false) || + (f."tracing"."0.1.13"."std" or false); } + { "${deps.tracing."0.1.13".tracing_core}".default = (f.tracing_core."${deps.tracing."0.1.13".tracing_core}".default or false); } + ]; + }) [ + (features_.cfg_if."${deps."tracing"."0.1.13"."cfg_if"}" deps) + (features_.tracing_attributes."${deps."tracing"."0.1.13"."tracing_attributes"}" deps) + (features_.tracing_core."${deps."tracing"."0.1.13"."tracing_core"}" deps) + ]; + + +# end +# tracing-attributes-0.1.7 + + crates.tracing_attributes."0.1.7" = deps: { features?(features_.tracing_attributes."0.1.7" deps {}) }: buildRustCrate { + crateName = "tracing-attributes"; + version = "0.1.7"; + description = "Procedural macro attributes for automatically instrumenting functions.\n"; + authors = [ "Tokio Contributors " "Eliza Weisman " "David Barsky " ]; + edition = "2018"; + sha256 = "1lfsmzhq5sqkxzkp0jxvwfmiyl33vqg3338dx7l4wqsz8qjfbnia"; + procMacro = true; + dependencies = mapFeatures features ([ + (crates."quote"."${deps."tracing_attributes"."0.1.7"."quote"}" deps) + (crates."syn"."${deps."tracing_attributes"."0.1.7"."syn"}" deps) + ]); + features = mkFeatures (features."tracing_attributes"."0.1.7" or {}); + }; + features_.tracing_attributes."0.1.7" = deps: f: updateFeatures f (rec { + quote."${deps.tracing_attributes."0.1.7".quote}".default = true; + syn = fold recursiveUpdate {} [ + { "${deps.tracing_attributes."0.1.7".syn}"."extra-traits" = true; } + { "${deps.tracing_attributes."0.1.7".syn}"."full" = true; } + { "${deps.tracing_attributes."0.1.7".syn}".default = true; } + ]; + tracing_attributes."0.1.7".default = (f.tracing_attributes."0.1.7".default or true); + }) [ + (features_.quote."${deps."tracing_attributes"."0.1.7"."quote"}" deps) + (features_.syn."${deps."tracing_attributes"."0.1.7"."syn"}" deps) + ]; + + +# end +# tracing-core-0.1.10 + + crates.tracing_core."0.1.10" = deps: { features?(features_.tracing_core."0.1.10" deps {}) }: buildRustCrate { + crateName = "tracing-core"; + version = "0.1.10"; + description = "Core primitives for application-level tracing.\n"; + authors = [ "Tokio Contributors " ]; + edition = "2018"; + sha256 = "0ilmnlfirylknnrwxfi38hs2000d8c60ax5zgd7ydc0bxkb8hisn"; + dependencies = mapFeatures features ([ + ] + ++ (if features.tracing_core."0.1.10".lazy_static or false then [ (crates.lazy_static."${deps."tracing_core"."0.1.10".lazy_static}" deps) ] else [])); + features = mkFeatures (features."tracing_core"."0.1.10" or {}); + }; + features_.tracing_core."0.1.10" = deps: f: updateFeatures f (rec { + lazy_static."${deps.tracing_core."0.1.10".lazy_static}".default = true; + tracing_core = fold recursiveUpdate {} [ + { "0.1.10"."lazy_static" = + (f.tracing_core."0.1.10"."lazy_static" or false) || + (f.tracing_core."0.1.10".std or false) || + (tracing_core."0.1.10"."std" or false); } + { "0.1.10"."std" = + (f.tracing_core."0.1.10"."std" or false) || + (f.tracing_core."0.1.10".default or false) || + (tracing_core."0.1.10"."default" or false); } + { "0.1.10".default = (f.tracing_core."0.1.10".default or true); } + ]; + }) [ + (features_.lazy_static."${deps."tracing_core"."0.1.10"."lazy_static"}" deps) + ]; + + +# end +# tracing-log-0.1.1 + + crates.tracing_log."0.1.1" = deps: { features?(features_.tracing_log."0.1.1" deps {}) }: buildRustCrate { + crateName = "tracing-log"; + version = "0.1.1"; + description = "Provides compatibility between `tracing` and the `log` crate.\n"; + authors = [ "Tokio Contributors " ]; + edition = "2018"; + sha256 = "1l63jav4zdxakk4gq4lmflrwvjf97074cnrcj23avjym635ngs98"; + dependencies = mapFeatures features ([ + (crates."lazy_static"."${deps."tracing_log"."0.1.1"."lazy_static"}" deps) + (crates."log"."${deps."tracing_log"."0.1.1"."log"}" deps) + (crates."tracing_core"."${deps."tracing_log"."0.1.1"."tracing_core"}" deps) + ]); + features = mkFeatures (features."tracing_log"."0.1.1" or {}); + }; + features_.tracing_log."0.1.1" = deps: f: updateFeatures f (rec { + lazy_static."${deps.tracing_log."0.1.1".lazy_static}".default = true; + log = fold recursiveUpdate {} [ + { "${deps.tracing_log."0.1.1".log}"."std" = + (f.log."${deps.tracing_log."0.1.1".log}"."std" or false) || + (tracing_log."0.1.1"."std" or false) || + (f."tracing_log"."0.1.1"."std" or false); } + { "${deps.tracing_log."0.1.1".log}".default = true; } + ]; + tracing_core."${deps.tracing_log."0.1.1".tracing_core}".default = true; + tracing_log = fold recursiveUpdate {} [ + { "0.1.1"."log-tracer" = + (f.tracing_log."0.1.1"."log-tracer" or false) || + (f.tracing_log."0.1.1".default or false) || + (tracing_log."0.1.1"."default" or false); } + { "0.1.1"."std" = + (f.tracing_log."0.1.1"."std" or false) || + (f.tracing_log."0.1.1".default or false) || + (tracing_log."0.1.1"."default" or false); } + { "0.1.1"."trace-logger" = + (f.tracing_log."0.1.1"."trace-logger" or false) || + (f.tracing_log."0.1.1".default or false) || + (tracing_log."0.1.1"."default" or false); } + { "0.1.1".default = (f.tracing_log."0.1.1".default or true); } + ]; + }) [ + (features_.lazy_static."${deps."tracing_log"."0.1.1"."lazy_static"}" deps) + (features_.log."${deps."tracing_log"."0.1.1"."log"}" deps) + (features_.tracing_core."${deps."tracing_log"."0.1.1"."tracing_core"}" deps) + ]; + + +# end +# tracing-serde-0.1.1 + + crates.tracing_serde."0.1.1" = deps: { features?(features_.tracing_serde."0.1.1" deps {}) }: buildRustCrate { + crateName = "tracing-serde"; + version = "0.1.1"; + description = "A compatibility layer for serializing trace data with `serde`\n"; + authors = [ "Tokio Contributors " ]; + edition = "2018"; + sha256 = "0sqhdbv20mla7z2m2sirmxgyg8jhy3dmm8rz961w5pianjlzb012"; + dependencies = mapFeatures features ([ + (crates."serde"."${deps."tracing_serde"."0.1.1"."serde"}" deps) + (crates."tracing_core"."${deps."tracing_serde"."0.1.1"."tracing_core"}" deps) + ]); + }; + features_.tracing_serde."0.1.1" = deps: f: updateFeatures f (rec { + serde."${deps.tracing_serde."0.1.1".serde}".default = true; + tracing_core."${deps.tracing_serde."0.1.1".tracing_core}".default = true; + tracing_serde."0.1.1".default = (f.tracing_serde."0.1.1".default or true); + }) [ + (features_.serde."${deps."tracing_serde"."0.1.1"."serde"}" deps) + (features_.tracing_core."${deps."tracing_serde"."0.1.1"."tracing_core"}" deps) + ]; + + +# end +# tracing-subscriber-0.2.5 + + crates.tracing_subscriber."0.2.5" = deps: { features?(features_.tracing_subscriber."0.2.5" deps {}) }: buildRustCrate { + crateName = "tracing-subscriber"; + version = "0.2.5"; + description = "Utilities for implementing and composing `tracing` subscribers.\n"; + authors = [ "Eliza Weisman " "David Barsky " "Tokio Contributors " ]; + edition = "2018"; + sha256 = "1glxasxnvnmg2ggvn8w9f4pk2pdlpdvjq610v412ni2nx83sjcps"; + dependencies = mapFeatures features ([ + (crates."tracing_core"."${deps."tracing_subscriber"."0.2.5"."tracing_core"}" deps) + ] + ++ (if features.tracing_subscriber."0.2.5".ansi_term or false then [ (crates.ansi_term."${deps."tracing_subscriber"."0.2.5".ansi_term}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".chrono or false then [ (crates.chrono."${deps."tracing_subscriber"."0.2.5".chrono}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".lazy_static or false then [ (crates.lazy_static."${deps."tracing_subscriber"."0.2.5".lazy_static}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".matchers or false then [ (crates.matchers."${deps."tracing_subscriber"."0.2.5".matchers}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".regex or false then [ (crates.regex."${deps."tracing_subscriber"."0.2.5".regex}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".serde or false then [ (crates.serde."${deps."tracing_subscriber"."0.2.5".serde}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".serde_json or false then [ (crates.serde_json."${deps."tracing_subscriber"."0.2.5".serde_json}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".sharded-slab or false then [ (crates.sharded_slab."${deps."tracing_subscriber"."0.2.5".sharded_slab}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".smallvec or false then [ (crates.smallvec."${deps."tracing_subscriber"."0.2.5".smallvec}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".tracing-log or false then [ (crates.tracing_log."${deps."tracing_subscriber"."0.2.5".tracing_log}" deps) ] else []) + ++ (if features.tracing_subscriber."0.2.5".tracing-serde or false then [ (crates.tracing_serde."${deps."tracing_subscriber"."0.2.5".tracing_serde}" deps) ] else [])); + features = mkFeatures (features."tracing_subscriber"."0.2.5" or {}); + }; + features_.tracing_subscriber."0.2.5" = deps: f: updateFeatures f (rec { + ansi_term."${deps.tracing_subscriber."0.2.5".ansi_term}".default = true; + chrono."${deps.tracing_subscriber."0.2.5".chrono}".default = true; + lazy_static."${deps.tracing_subscriber."0.2.5".lazy_static}".default = true; + matchers."${deps.tracing_subscriber."0.2.5".matchers}".default = true; + regex."${deps.tracing_subscriber."0.2.5".regex}".default = true; + serde."${deps.tracing_subscriber."0.2.5".serde}".default = true; + serde_json."${deps.tracing_subscriber."0.2.5".serde_json}".default = true; + sharded_slab."${deps.tracing_subscriber."0.2.5".sharded_slab}".default = true; + smallvec."${deps.tracing_subscriber."0.2.5".smallvec}".default = true; + tracing_core."${deps.tracing_subscriber."0.2.5".tracing_core}".default = true; + tracing_log = fold recursiveUpdate {} [ + { "${deps.tracing_subscriber."0.2.5".tracing_log}"."log-tracer" = true; } + { "${deps.tracing_subscriber."0.2.5".tracing_log}"."std" = true; } + { "${deps.tracing_subscriber."0.2.5".tracing_log}".default = (f.tracing_log."${deps.tracing_subscriber."0.2.5".tracing_log}".default or false); } + ]; + tracing_serde."${deps.tracing_subscriber."0.2.5".tracing_serde}".default = true; + tracing_subscriber = fold recursiveUpdate {} [ + { "0.2.5"."ansi" = + (f.tracing_subscriber."0.2.5"."ansi" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."ansi_term" = + (f.tracing_subscriber."0.2.5"."ansi_term" or false) || + (f.tracing_subscriber."0.2.5".ansi or false) || + (tracing_subscriber."0.2.5"."ansi" or false); } + { "0.2.5"."chrono" = + (f.tracing_subscriber."0.2.5"."chrono" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."env-filter" = + (f.tracing_subscriber."0.2.5"."env-filter" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."fmt" = + (f.tracing_subscriber."0.2.5"."fmt" or false) || + (f.tracing_subscriber."0.2.5".ansi or false) || + (tracing_subscriber."0.2.5"."ansi" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."json" = + (f.tracing_subscriber."0.2.5"."json" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."lazy_static" = + (f.tracing_subscriber."0.2.5"."lazy_static" or false) || + (f.tracing_subscriber."0.2.5".env-filter or false) || + (tracing_subscriber."0.2.5"."env-filter" or false); } + { "0.2.5"."matchers" = + (f.tracing_subscriber."0.2.5"."matchers" or false) || + (f.tracing_subscriber."0.2.5".env-filter or false) || + (tracing_subscriber."0.2.5"."env-filter" or false); } + { "0.2.5"."regex" = + (f.tracing_subscriber."0.2.5"."regex" or false) || + (f.tracing_subscriber."0.2.5".env-filter or false) || + (tracing_subscriber."0.2.5"."env-filter" or false); } + { "0.2.5"."registry" = + (f.tracing_subscriber."0.2.5"."registry" or false) || + (f.tracing_subscriber."0.2.5".fmt or false) || + (tracing_subscriber."0.2.5"."fmt" or false); } + { "0.2.5"."serde" = + (f.tracing_subscriber."0.2.5"."serde" or false) || + (f.tracing_subscriber."0.2.5".json or false) || + (tracing_subscriber."0.2.5"."json" or false); } + { "0.2.5"."serde_json" = + (f.tracing_subscriber."0.2.5"."serde_json" or false) || + (f.tracing_subscriber."0.2.5".json or false) || + (tracing_subscriber."0.2.5"."json" or false); } + { "0.2.5"."sharded-slab" = + (f.tracing_subscriber."0.2.5"."sharded-slab" or false) || + (f.tracing_subscriber."0.2.5".registry or false) || + (tracing_subscriber."0.2.5"."registry" or false); } + { "0.2.5"."smallvec" = + (f.tracing_subscriber."0.2.5"."smallvec" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."tracing-log" = + (f.tracing_subscriber."0.2.5"."tracing-log" or false) || + (f.tracing_subscriber."0.2.5".default or false) || + (tracing_subscriber."0.2.5"."default" or false); } + { "0.2.5"."tracing-serde" = + (f.tracing_subscriber."0.2.5"."tracing-serde" or false) || + (f.tracing_subscriber."0.2.5".json or false) || + (tracing_subscriber."0.2.5"."json" or false); } + { "0.2.5".default = (f.tracing_subscriber."0.2.5".default or true); } + ]; + }) [ + (features_.ansi_term."${deps."tracing_subscriber"."0.2.5"."ansi_term"}" deps) + (features_.chrono."${deps."tracing_subscriber"."0.2.5"."chrono"}" deps) + (features_.lazy_static."${deps."tracing_subscriber"."0.2.5"."lazy_static"}" deps) + (features_.matchers."${deps."tracing_subscriber"."0.2.5"."matchers"}" deps) + (features_.regex."${deps."tracing_subscriber"."0.2.5"."regex"}" deps) + (features_.serde."${deps."tracing_subscriber"."0.2.5"."serde"}" deps) + (features_.serde_json."${deps."tracing_subscriber"."0.2.5"."serde_json"}" deps) + (features_.sharded_slab."${deps."tracing_subscriber"."0.2.5"."sharded_slab"}" deps) + (features_.smallvec."${deps."tracing_subscriber"."0.2.5"."smallvec"}" deps) + (features_.tracing_core."${deps."tracing_subscriber"."0.2.5"."tracing_core"}" deps) + (features_.tracing_log."${deps."tracing_subscriber"."0.2.5"."tracing_log"}" deps) + (features_.tracing_serde."${deps."tracing_subscriber"."0.2.5"."tracing_serde"}" deps) + ]; + + # end # traitobject-0.1.0 @@ -5551,21 +6095,6 @@ rec { }) []; -# end -# ucd-util-0.1.3 - - crates.ucd_util."0.1.3" = deps: { features?(features_.ucd_util."0.1.3" deps {}) }: buildRustCrate { - crateName = "ucd-util"; - version = "0.1.3"; - description = "A small utility library for working with the Unicode character database.\n"; - authors = [ "Andrew Gallant " ]; - sha256 = "1n1qi3jywq5syq90z9qd8qzbn58pcjgv1sx4sdmipm4jf9zanz15"; - }; - features_.ucd_util."0.1.3" = deps: f: updateFeatures f (rec { - ucd_util."0.1.3".default = (f.ucd_util."0.1.3".default or true); - }) []; - - # end # unicase-1.4.2 @@ -5750,21 +6279,6 @@ rec { }) []; -# end -# utf8-ranges-1.0.2 - - crates.utf8_ranges."1.0.2" = deps: { features?(features_.utf8_ranges."1.0.2" deps {}) }: buildRustCrate { - crateName = "utf8-ranges"; - version = "1.0.2"; - description = "Convert ranges of Unicode codepoints to UTF-8 byte ranges."; - authors = [ "Andrew Gallant " ]; - sha256 = "1my02laqsgnd8ib4dvjgd4rilprqjad6pb9jj9vi67csi5qs2281"; - }; - features_.utf8_ranges."1.0.2" = deps: f: updateFeatures f (rec { - utf8_ranges."1.0.2".default = (f.utf8_ranges."1.0.2".default or true); - }) []; - - # end # uuid-0.4.0 From 35e08cb5d1dc50de273aea9a2ca3b276879eb366 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 18:47:44 +0200 Subject: [PATCH 03/10] log -> tracing --- ofborg/src/asynccmd.rs | 2 ++ ofborg/src/bin/build-faker.rs | 3 ++- ofborg/src/bin/builder.rs | 2 +- ofborg/src/bin/evaluation-filter.rs | 3 ++- ofborg/src/bin/github-comment-filter.rs | 5 +++-- ofborg/src/bin/github-comment-poster.rs | 5 +++-- ofborg/src/bin/log-message-collector.rs | 3 ++- ofborg/src/bin/log-message-generator.rs | 3 ++- ofborg/src/bin/mass-rebuilder.rs | 5 +++-- ofborg/src/bin/stats.rs | 7 ++++--- ofborg/src/checkout.rs | 2 ++ ofborg/src/clone.rs | 2 ++ ofborg/src/commentparser.rs | 1 + ofborg/src/commitstatus.rs | 2 ++ ofborg/src/config.rs | 11 ++++++----- ofborg/src/easyamqp.rs | 1 + ofborg/src/easylapin.rs | 11 ++++++----- ofborg/src/lib.rs | 24 ++++++++++++----------- ofborg/src/nixenv.rs | 2 ++ ofborg/src/outpathdiff.rs | 2 ++ ofborg/src/tagger.rs | 2 ++ ofborg/src/tasks/build.rs | 5 +++-- ofborg/src/tasks/eval/nixpkgs.rs | 7 ++++--- ofborg/src/tasks/eval/stdenvs.rs | 2 ++ ofborg/src/tasks/evaluate.rs | 9 +++++---- ofborg/src/tasks/evaluationfilter.rs | 2 ++ ofborg/src/tasks/githubcommentfilter.rs | 1 + ofborg/src/tasks/githubcommentposter.rs | 1 + ofborg/src/tasks/log_message_collector.rs | 5 +++-- ofborg/src/tasks/statscollector.rs | 2 ++ ofborg/src/test_scratch.rs | 2 ++ ofborg/src/worker.rs | 5 +++-- 32 files changed, 91 insertions(+), 48 deletions(-) diff --git a/ofborg/src/asynccmd.rs b/ofborg/src/asynccmd.rs index ec72565..a6c29fe 100644 --- a/ofborg/src/asynccmd.rs +++ b/ofborg/src/asynccmd.rs @@ -4,6 +4,8 @@ use std::process::{Child, Command, ExitStatus, Stdio}; use std::sync::mpsc::{self, sync_channel, Receiver, SyncSender}; use std::thread::{self, JoinHandle}; +use tracing::{debug, error, info}; + // Specifically set to fall under 1/2 of the AMQP library's // SyncSender limitation. const OUT_CHANNEL_BUFFER_SIZE: usize = 30; diff --git a/ofborg/src/bin/build-faker.rs b/ofborg/src/bin/build-faker.rs index ad51c40..778e336 100644 --- a/ofborg/src/bin/build-faker.rs +++ b/ofborg/src/bin/build-faker.rs @@ -1,4 +1,3 @@ -use log::{info, log}; use ofborg::commentparser; use ofborg::config; use ofborg::easyamqp; @@ -8,6 +7,8 @@ use ofborg::worker; use std::env; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/bin/builder.rs b/ofborg/src/bin/builder.rs index d5529e1..7b4a9b3 100644 --- a/ofborg/src/bin/builder.rs +++ b/ofborg/src/bin/builder.rs @@ -3,7 +3,7 @@ use std::error::Error; use std::path::Path; use async_std::task; -use log::{info, log, warn}; +use tracing::{info, warn}; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; use ofborg::easylapin; diff --git a/ofborg/src/bin/evaluation-filter.rs b/ofborg/src/bin/evaluation-filter.rs index 96e65ce..91d519f 100644 --- a/ofborg/src/bin/evaluation-filter.rs +++ b/ofborg/src/bin/evaluation-filter.rs @@ -1,5 +1,4 @@ use amqp::Basic; -use log::{info, log}; use ofborg::config; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; use ofborg::tasks; @@ -7,6 +6,8 @@ use ofborg::worker; use std::env; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/bin/github-comment-filter.rs b/ofborg/src/bin/github-comment-filter.rs index c872756..af18796 100644 --- a/ofborg/src/bin/github-comment-filter.rs +++ b/ofborg/src/bin/github-comment-filter.rs @@ -1,5 +1,3 @@ -use amqp::Basic; -use log::{info, log}; use ofborg::config; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; use ofborg::tasks; @@ -7,6 +5,9 @@ use ofborg::worker; use std::env; +use amqp::Basic; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/bin/github-comment-poster.rs b/ofborg/src/bin/github-comment-poster.rs index cca3925..25d0c66 100644 --- a/ofborg/src/bin/github-comment-poster.rs +++ b/ofborg/src/bin/github-comment-poster.rs @@ -1,5 +1,3 @@ -use amqp::Basic; -use log::{info, log}; use ofborg::config; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; use ofborg::tasks; @@ -7,6 +5,9 @@ use ofborg::worker; use std::env; +use amqp::Basic; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/bin/log-message-collector.rs b/ofborg/src/bin/log-message-collector.rs index b49a809..a9e5cef 100644 --- a/ofborg/src/bin/log-message-collector.rs +++ b/ofborg/src/bin/log-message-collector.rs @@ -1,4 +1,3 @@ -use log::{info, log}; use ofborg::config; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; use ofborg::tasks; @@ -7,6 +6,8 @@ use ofborg::worker; use std::env; use std::path::PathBuf; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/bin/log-message-generator.rs b/ofborg/src/bin/log-message-generator.rs index 467d791..6ab7915 100644 --- a/ofborg/src/bin/log-message-generator.rs +++ b/ofborg/src/bin/log-message-generator.rs @@ -1,4 +1,3 @@ -use log::{info, log}; use ofborg::config; use ofborg::easyamqp; use ofborg::message::{buildjob, Pr, Repo}; @@ -9,6 +8,8 @@ use std::env; use std::thread; use std::time::Duration; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/bin/mass-rebuilder.rs b/ofborg/src/bin/mass-rebuilder.rs index 353afe6..7c098b6 100644 --- a/ofborg/src/bin/mass-rebuilder.rs +++ b/ofborg/src/bin/mass-rebuilder.rs @@ -1,5 +1,3 @@ -use amqp::Basic; -use log::{error, info, log}; use ofborg::checkout; use ofborg::config; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; @@ -11,6 +9,9 @@ use std::env; use std::path::Path; use std::process; +use amqp::Basic; +use tracing::{error, info}; + fn main() { let memory_info = sys_info::mem_info().expect("Unable to get memory information from OS"); diff --git a/ofborg/src/bin/stats.rs b/ofborg/src/bin/stats.rs index a835cbf..06a4ffc 100644 --- a/ofborg/src/bin/stats.rs +++ b/ofborg/src/bin/stats.rs @@ -1,12 +1,13 @@ -use amqp::Basic; -use hyper::server::{Request, Response, Server}; -use log::{info, log}; use ofborg::easyamqp::{ChannelExt, ConsumerExt}; use ofborg::{config, easyamqp, stats, tasks, worker}; use std::env; use std::thread; +use amqp::Basic; +use hyper::server::{Request, Response, Server}; +use tracing::info; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); diff --git a/ofborg/src/checkout.rs b/ofborg/src/checkout.rs index 10cd7de..8e4109b 100644 --- a/ofborg/src/checkout.rs +++ b/ofborg/src/checkout.rs @@ -6,6 +6,8 @@ use std::io::{Error, ErrorKind}; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; +use tracing::info; + pub struct CachedCloner { root: PathBuf, } diff --git a/ofborg/src/clone.rs b/ofborg/src/clone.rs index cba44b6..4b177ae 100644 --- a/ofborg/src/clone.rs +++ b/ofborg/src/clone.rs @@ -6,6 +6,8 @@ use std::io::{Error, ErrorKind}; use std::path::PathBuf; use std::process::{Command, Stdio}; +use tracing::{debug, info, warn}; + pub struct Lock { lock: Option, } diff --git a/ofborg/src/commentparser.rs b/ofborg/src/commentparser.rs index 16eaa52..8488894 100644 --- a/ofborg/src/commentparser.rs +++ b/ofborg/src/commentparser.rs @@ -1,4 +1,5 @@ use nom::types::CompleteStr; +use tracing::warn; pub fn parse(text: &str) -> Option> { let instructions: Vec = text diff --git a/ofborg/src/commitstatus.rs b/ofborg/src/commitstatus.rs index 3ad3d1b..8ee6dd6 100644 --- a/ofborg/src/commitstatus.rs +++ b/ofborg/src/commitstatus.rs @@ -1,3 +1,5 @@ +use tracing::warn; + pub struct CommitStatus<'a> { api: hubcaps::statuses::Statuses<'a>, sha: String, diff --git a/ofborg/src/config.rs b/ofborg/src/config.rs index 8df12b0..5b4ab3e 100644 --- a/ofborg/src/config.rs +++ b/ofborg/src/config.rs @@ -1,16 +1,17 @@ use crate::acl; use crate::nix::Nix; -use hubcaps::{Credentials, Github, InstallationTokenGenerator, JWTCredentials}; -use hyper::net::HttpsConnector; -use hyper::Client; -use hyper_native_tls::NativeTlsClient; - use std::collections::HashMap; use std::fs::File; use std::io::Read; use std::path::{Path, PathBuf}; +use hubcaps::{Credentials, Github, InstallationTokenGenerator, JWTCredentials}; +use hyper::net::HttpsConnector; +use hyper::Client; +use hyper_native_tls::NativeTlsClient; +use tracing::{debug, error, info, warn}; + #[derive(Serialize, Deserialize, Debug)] pub struct Config { pub runner: RunnerConfig, diff --git a/ofborg/src/easyamqp.rs b/ofborg/src/easyamqp.rs index 3104e24..01646cd 100644 --- a/ofborg/src/easyamqp.rs +++ b/ofborg/src/easyamqp.rs @@ -2,6 +2,7 @@ use crate::config::RabbitMQConfig; use crate::ofborg; use amqp::Basic; +use tracing::info; pub struct ConsumeConfig { /// Specifies the name of the queue to consume from. diff --git a/ofborg/src/easylapin.rs b/ofborg/src/easylapin.rs index c5c8eb6..f060519 100644 --- a/ofborg/src/easylapin.rs +++ b/ofborg/src/easylapin.rs @@ -21,6 +21,7 @@ use lapin::types::{AMQPValue, FieldTable}; use lapin::{ BasicProperties, Channel, CloseOnDrop, Connection, ConnectionProperties, ExchangeKind, }; +use tracing::debug; pub fn from_config(cfg: &RabbitMQConfig) -> Result, lapin::Error> { let mut props = FieldTable::default(); @@ -146,7 +147,7 @@ impl ConsumerExt for NotifyChannel { let mut chan = self.0; Ok(Box::pin(async move { while let Some(Ok(deliver)) = consumer.next().await { - log::debug!("delivery {}", deliver.delivery_tag); + debug!("delivery {}", deliver.delivery_tag); let mut receiver = ChannelNotificationReceiver { channel: &mut chan, deliver: &deliver, @@ -174,25 +175,25 @@ async fn action_deliver( ) -> Result<(), lapin::Error> { match action { Action::Ack => { - log::debug!("action ack"); + debug!("action ack"); chan.basic_ack(deliver.delivery_tag, BasicAckOptions::default()) .await } Action::NackRequeue => { - log::debug!("action nack requeue"); + debug!("action nack requeue"); let mut opts = BasicNackOptions::default(); opts.requeue = true; chan.basic_nack(deliver.delivery_tag, opts).await } Action::NackDump => { - log::debug!("action nack dump"); + debug!("action nack dump"); chan.basic_nack(deliver.delivery_tag, BasicNackOptions::default()) .await } Action::Publish(mut msg) => { let exch = msg.exchange.take().unwrap_or_else(|| "".to_owned()); let key = msg.routing_key.take().unwrap_or_else(|| "".to_owned()); - log::debug!("action publish {}", exch); + debug!("action publish {}", exch); let mut props = BasicProperties::default().with_delivery_mode(2); // persistent. diff --git a/ofborg/src/lib.rs b/ofborg/src/lib.rs index f5bc48a..4f15971 100644 --- a/ofborg/src/lib.rs +++ b/ofborg/src/lib.rs @@ -8,13 +8,11 @@ #[macro_use] extern crate serde_derive; -#[macro_use] -extern crate log; - #[macro_use] extern crate nom; -use std::env; +use tracing_subscriber::prelude::*; +use tracing_subscriber::EnvFilter; pub mod acl; pub mod asynccmd; @@ -90,11 +88,15 @@ pub mod ofborg { } pub fn setup_log() { - if env::var("RUST_LOG").is_err() { - env::set_var("RUST_LOG", "info"); - env_logger::init().unwrap(); - info!("Defaulting RUST_LOG environment variable to info"); - } else { - env_logger::init().unwrap(); - } + let fmt_layer = tracing_subscriber::fmt::layer(); + let filter_layer = EnvFilter::try_from_default_env() + .or_else(|_| EnvFilter::try_new("info")) + .unwrap(); + + tracing_subscriber::registry() + .with(filter_layer) + .with(fmt_layer) + .init(); + + tracing::info!("Logging configured"); } diff --git a/ofborg/src/nixenv.rs b/ofborg/src/nixenv.rs index 6915ec7..000661a 100644 --- a/ofborg/src/nixenv.rs +++ b/ofborg/src/nixenv.rs @@ -8,6 +8,8 @@ use std::fs::{self, File}; use std::io::{self, BufRead, BufReader, Read, Seek, SeekFrom, Write}; use std::path::PathBuf; +use tracing::warn; + pub struct HydraNixEnv { path: PathBuf, nix: nix::Nix, diff --git a/ofborg/src/outpathdiff.rs b/ofborg/src/outpathdiff.rs index 86de6ea..e482b5d 100644 --- a/ofborg/src/outpathdiff.rs +++ b/ofborg/src/outpathdiff.rs @@ -6,6 +6,8 @@ use std::collections::{HashMap, HashSet}; use std::io::BufRead; use std::path::PathBuf; +use tracing::{debug, info, trace}; + pub struct OutPathDiff { calculator: HydraNixEnv, pub original: Option<(PackageOutPaths, EvaluationStats)>, diff --git a/ofborg/src/tagger.rs b/ofborg/src/tagger.rs index 19939ce..8ecdc7a 100644 --- a/ofborg/src/tagger.rs +++ b/ofborg/src/tagger.rs @@ -4,6 +4,8 @@ use crate::tasks; use std::collections::HashMap; +use tracing::info; + pub struct StdenvTagger { possible: Vec, selected: Vec, diff --git a/ofborg/src/tasks/build.rs b/ofborg/src/tasks/build.rs index 0d8c42f..4d3b5dc 100644 --- a/ofborg/src/tasks/build.rs +++ b/ofborg/src/tasks/build.rs @@ -6,10 +6,11 @@ use crate::nix; use crate::notifyworker; use crate::worker; -use uuid::Uuid; - use std::collections::VecDeque; +use uuid::Uuid; +use tracing::{error, info}; + pub struct BuildWorker { cloner: checkout::CachedCloner, nix: nix::Nix, diff --git a/ofborg/src/tasks/eval/nixpkgs.rs b/ofborg/src/tasks/eval/nixpkgs.rs index d8b73dd..9374d16 100644 --- a/ofborg/src/tasks/eval/nixpkgs.rs +++ b/ofborg/src/tasks/eval/nixpkgs.rs @@ -16,16 +16,17 @@ use crate::tasks::eval::{ }; use crate::tasks::evaluate::{make_gist, update_labels}; +use std::collections::HashMap; +use std::path::Path; + use chrono::Utc; use hubcaps::checks::{CheckRunOptions, CheckRunState, Conclusion, Output}; use hubcaps::gists::Gists; use hubcaps::issues::{Issue, IssueRef}; use hubcaps::repositories::Repository; +use tracing::warn; use uuid::Uuid; -use std::collections::HashMap; -use std::path::Path; - pub struct NixpkgsStrategy<'a> { job: &'a EvaluationJob, pull: &'a hubcaps::pulls::PullRequest<'a>, diff --git a/ofborg/src/tasks/eval/stdenvs.rs b/ofborg/src/tasks/eval/stdenvs.rs index fcaeb34..673f462 100644 --- a/ofborg/src/tasks/eval/stdenvs.rs +++ b/ofborg/src/tasks/eval/stdenvs.rs @@ -3,6 +3,8 @@ use crate::nix; use std::path::PathBuf; +use tracing::{info, warn}; + enum StdenvFrom { Before, After, diff --git a/ofborg/src/tasks/evaluate.rs b/ofborg/src/tasks/evaluate.rs index 751e48c..a5bf6ad 100644 --- a/ofborg/src/tasks/evaluate.rs +++ b/ofborg/src/tasks/evaluate.rs @@ -11,15 +11,16 @@ use crate::systems; use crate::tasks::eval; use crate::worker; -use hubcaps::checks::CheckRunOptions; -use hubcaps::gists::Gists; -use hubcaps::issues::Issue; - use std::collections::HashMap; use std::path::Path; use std::sync::RwLock; use std::time::Instant; +use hubcaps::checks::CheckRunOptions; +use hubcaps::gists::Gists; +use hubcaps::issues::Issue; +use tracing::{error, info, warn}; + pub struct EvaluationWorker { cloner: checkout::CachedCloner, nix: nix::Nix, diff --git a/ofborg/src/tasks/evaluationfilter.rs b/ofborg/src/tasks/evaluationfilter.rs index c8184b6..5a2f10f 100644 --- a/ofborg/src/tasks/evaluationfilter.rs +++ b/ofborg/src/tasks/evaluationfilter.rs @@ -3,6 +3,8 @@ use crate::ghevent; use crate::message::{evaluationjob, Pr, Repo}; use crate::worker; +use tracing::info; + pub struct EvaluationFilterWorker { acl: acl::ACL, } diff --git a/ofborg/src/tasks/githubcommentfilter.rs b/ofborg/src/tasks/githubcommentfilter.rs index 239fca7..03a1c0d 100644 --- a/ofborg/src/tasks/githubcommentfilter.rs +++ b/ofborg/src/tasks/githubcommentfilter.rs @@ -4,6 +4,7 @@ use crate::ghevent; use crate::message::{buildjob, evaluationjob, Pr, Repo}; use crate::worker; +use tracing::{error, info}; use uuid::Uuid; pub struct GitHubCommentWorker { diff --git a/ofborg/src/tasks/githubcommentposter.rs b/ofborg/src/tasks/githubcommentposter.rs index 82fea77..188b73a 100644 --- a/ofborg/src/tasks/githubcommentposter.rs +++ b/ofborg/src/tasks/githubcommentposter.rs @@ -6,6 +6,7 @@ use crate::worker; use chrono::{DateTime, Utc}; use hubcaps::checks::{CheckRunOptions, CheckRunState, Conclusion, Output}; +use tracing::info; pub struct GitHubCommentPoster { github_vend: GithubAppVendingMachine, diff --git a/ofborg/src/tasks/log_message_collector.rs b/ofborg/src/tasks/log_message_collector.rs index 38a0bd1..3240531 100644 --- a/ofborg/src/tasks/log_message_collector.rs +++ b/ofborg/src/tasks/log_message_collector.rs @@ -3,12 +3,13 @@ use crate::message::buildresult::BuildResult; use crate::worker; use crate::writetoline::LineWriter; -use lru_cache::LruCache; - use std::fs::{self, File, OpenOptions}; use std::io::Write; use std::path::{Component, PathBuf}; +use lru_cache::LruCache; +use tracing::warn; + #[derive(Eq, PartialEq, Hash, Debug, Clone)] pub struct LogFrom { routing_key: String, diff --git a/ofborg/src/tasks/statscollector.rs b/ofborg/src/tasks/statscollector.rs index 84e733e..c28707b 100644 --- a/ofborg/src/tasks/statscollector.rs +++ b/ofborg/src/tasks/statscollector.rs @@ -1,6 +1,8 @@ use crate::stats; use crate::worker; +use tracing::error; + pub struct StatCollectorWorker { events: E, collector: stats::MetricCollector, diff --git a/ofborg/src/test_scratch.rs b/ofborg/src/test_scratch.rs index e8e1884..ae20f5d 100644 --- a/ofborg/src/test_scratch.rs +++ b/ofborg/src/test_scratch.rs @@ -2,6 +2,8 @@ use std::fs; use std::path::{Path, PathBuf}; use std::process::Command; +use tracing::debug; + pub struct TestScratch { root: PathBuf, } diff --git a/ofborg/src/worker.rs b/ofborg/src/worker.rs index 51a72ba..960917a 100644 --- a/ofborg/src/worker.rs +++ b/ofborg/src/worker.rs @@ -1,8 +1,9 @@ +use std::marker::Send; + use amqp::protocol::basic::{BasicProperties, Deliver}; use amqp::Basic; use serde::Serialize; - -use std::marker::Send; +use tracing::error; pub struct Worker { internal: T, From 82e12ebe52bf355a3ac7376678efc167b5907f3b Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 20:13:50 +0200 Subject: [PATCH 04/10] add some basic structured logging to the builder --- ofborg/src/config.rs | 6 +----- ofborg/src/easylapin.rs | 13 ++++++++----- ofborg/src/tasks/build.rs | 11 +++++++++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ofborg/src/config.rs b/ofborg/src/config.rs index 5b4ab3e..1f3fc81 100644 --- a/ofborg/src/config.rs +++ b/ofborg/src/config.rs @@ -126,11 +126,7 @@ impl Config { pub fn nix(&self) -> Nix { if self.nix.build_timeout_seconds < 1200 { - error!( - "Note: {} is way too low for build_timeout_seconds!", - self.nix.build_timeout_seconds - ); - error!("Please set build_timeout_seconds to at least 1200"); + error!(?self.nix.build_timeout_seconds, "Please set build_timeout_seconds to at least 1200"); panic!(); } diff --git a/ofborg/src/easylapin.rs b/ofborg/src/easylapin.rs index f060519..0ef08a0 100644 --- a/ofborg/src/easylapin.rs +++ b/ofborg/src/easylapin.rs @@ -96,6 +96,7 @@ impl ConsumerExt for CloseOnDrop { ))?; Ok(Box::pin(async move { while let Some(Ok(deliver)) = consumer.next().await { + debug!(?deliver.delivery_tag, "consumed delivery"); let content_type = deliver.properties.content_type(); let job = worker .msg_to_job( @@ -110,6 +111,7 @@ impl ConsumerExt for CloseOnDrop { .await .expect("action deliver failure"); } + debug!(?deliver.delivery_tag, "done"); } })) } @@ -147,7 +149,7 @@ impl ConsumerExt for NotifyChannel { let mut chan = self.0; Ok(Box::pin(async move { while let Some(Ok(deliver)) = consumer.next().await { - debug!("delivery {}", deliver.delivery_tag); + debug!(?deliver.delivery_tag, "consumed delivery"); let mut receiver = ChannelNotificationReceiver { channel: &mut chan, deliver: &deliver, @@ -163,6 +165,7 @@ impl ConsumerExt for NotifyChannel { .expect("worker unexpected message consumed"); worker.consumer(&job, &mut receiver); + debug!(?deliver.delivery_tag, "done"); } })) } @@ -175,25 +178,25 @@ async fn action_deliver( ) -> Result<(), lapin::Error> { match action { Action::Ack => { - debug!("action ack"); + debug!(?deliver.delivery_tag, "action ack"); chan.basic_ack(deliver.delivery_tag, BasicAckOptions::default()) .await } Action::NackRequeue => { - debug!("action nack requeue"); + debug!(?deliver.delivery_tag, "action nack requeue"); let mut opts = BasicNackOptions::default(); opts.requeue = true; chan.basic_nack(deliver.delivery_tag, opts).await } Action::NackDump => { - debug!("action nack dump"); + debug!(?deliver.delivery_tag, "action nack dump"); chan.basic_nack(deliver.delivery_tag, BasicNackOptions::default()) .await } Action::Publish(mut msg) => { let exch = msg.exchange.take().unwrap_or_else(|| "".to_owned()); let key = msg.routing_key.take().unwrap_or_else(|| "".to_owned()); - debug!("action publish {}", exch); + debug!(?exch, ?key, "action publish"); let mut props = BasicProperties::default().with_delivery_mode(2); // persistent. diff --git a/ofborg/src/tasks/build.rs b/ofborg/src/tasks/build.rs index 4d3b5dc..4f0721c 100644 --- a/ofborg/src/tasks/build.rs +++ b/ofborg/src/tasks/build.rs @@ -8,8 +8,8 @@ use crate::worker; use std::collections::VecDeque; +use tracing::{debug, debug_span, error, info}; use uuid::Uuid; -use tracing::{error, info}; pub struct BuildWorker { cloner: checkout::CachedCloner, @@ -276,14 +276,21 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker { job: &buildjob::BuildJob, notifier: &mut dyn notifyworker::NotificationReceiver, ) { + let span = debug_span!("job", pr = ?job.pr.number); + let _enter = span.enter(); + let mut actions = self.actions(&job, notifier); if job.attrs.is_empty() { + debug!("No attrs to build"); actions.nothing_to_do(); return; } - info!("Working on {}", job.pr.number); + info!( + "Working on https://github.com/{}/pull/{}", + job.repo.full_name, job.pr.number + ); let project = self .cloner .project(&job.repo.full_name, job.repo.clone_url.clone()); From 0cef8f4e0d413dfbc995add17d9b2a81e443d50b Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 21:01:39 +0200 Subject: [PATCH 05/10] split out block_on_waiters --- ofborg/src/asynccmd.rs | 89 ++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/ofborg/src/asynccmd.rs b/ofborg/src/asynccmd.rs index a6c29fe..b457d4a 100644 --- a/ofborg/src/asynccmd.rs +++ b/ofborg/src/asynccmd.rs @@ -122,48 +122,7 @@ impl AsyncCmd { child_wait(WaitTarget::Child, monitor_tx, child), ); - let head_waiter = thread::spawn(move || { - let mut return_status: Option> = None; - - for (id, interior_result) in monitor_rx.iter() { - match waiters.remove(&id) { - Some(handle) => { - info!("Received notice that {:?} finished", id); - let waiter_result = handle.join(); - - info!("waiter status: {:?}", waiter_result); - info!("interior status: {:?}", interior_result); - - match interior_result { - WaitResult::Thread(t) => { - debug!("thread result: {:?}", t); - } - WaitResult::Process(t) => { - return_status = Some(t); - } - } - } - None => { - error!( - "Received notice that {:?} finished, but it isn't being waited on?", - id - ); - } - } - - if waiters.is_empty() { - debug!("Closing up the waiter receiver thread, no more waiters."); - break; - } - } - - info!( - "Out of the child waiter recv, with {:?} remaining waits", - waiters.len() - ); - - return_status - }); + let head_waiter = thread::spawn(move || block_on_waiters(monitor_rx, waiters)); SpawnedAsyncCmd { waiter: head_waiter, @@ -190,6 +149,52 @@ impl SpawnedAsyncCmd { } } +fn block_on_waiters( + monitor_rx: mpsc::Receiver<(WaitTarget, WaitResult<()>)>, + mut waiters: HashMap>, +) -> Option> { + let mut status = None; + + for (id, interior_result) in monitor_rx.iter() { + match waiters.remove(&id) { + Some(handle) => { + info!("Received notice that {:?} finished", id); + let waiter_result = handle.join(); + + info!("waiter status: {:?}", waiter_result); + info!("interior status: {:?}", interior_result); + + match interior_result { + WaitResult::Thread(t) => { + debug!("thread result: {:?}", t); + } + WaitResult::Process(t) => { + status = Some(t); + } + } + } + None => { + error!( + "Received notice that {:?} finished, but it isn't being waited on?", + id + ); + } + } + + if waiters.is_empty() { + debug!("Closing up the waiter receiver thread, no more waiters."); + break; + } + } + + info!( + "Out of the child waiter recv, with {:?} remaining waits", + waiters.len() + ); + + status +} + #[cfg(test)] mod tests { use super::AsyncCmd; From cc89c1a88dc99c14769993f825d75ff2f31280c0 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 21:16:03 +0200 Subject: [PATCH 06/10] move exit status handling to nix module --- ofborg/src/nix.rs | 24 ++++++++++++++++++++++-- ofborg/src/tasks/build.rs | 18 +----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/ofborg/src/nix.rs b/ofborg/src/nix.rs index e0bb21a..df0bada 100644 --- a/ofborg/src/nix.rs +++ b/ofborg/src/nix.rs @@ -1,8 +1,7 @@ use crate::asynccmd::{AsyncCmd, SpawnedAsyncCmd}; +use crate::message::buildresult::BuildStatus; use crate::ofborg::partition_result; -use tempfile::tempfile; - use std::collections::HashMap; use std::env; use std::ffi::OsStr; @@ -12,6 +11,8 @@ use std::io::{BufRead, BufReader, Seek, SeekFrom}; use std::path::Path; use std::process::{Command, Stdio}; +use tempfile::tempfile; + #[derive(Clone, Copy, Debug, PartialEq)] pub enum File { DefaultNixpkgs, @@ -358,6 +359,25 @@ pub fn is_user_setting_warning(line: &str) -> bool { && line.ends_with("because it is a restricted setting and you are not a trusted user") } +pub fn wait_for_build_status(spawned: SpawnedAsyncCmd) -> BuildStatus { + match spawned.wait() { + Ok(s) => match s.code() { + Some(0) => BuildStatus::Success, + Some(100) => BuildStatus::Failure, // nix permanent failure + Some(101) => BuildStatus::TimedOut, // nix build timedout + Some(i) => BuildStatus::UnexpectedError { + err: format!("command failed with exit code {}", i), + }, + None => BuildStatus::UnexpectedError { + err: "unexpected build failure".into(), + }, + }, + e => BuildStatus::UnexpectedError { + err: format!("failed on interior command {:?}", e), + }, + } +} + #[cfg(test)] mod tests { fn nix() -> Nix { diff --git a/ofborg/src/tasks/build.rs b/ofborg/src/tasks/build.rs index 4f0721c..cce1925 100644 --- a/ofborg/src/tasks/build.rs +++ b/ofborg/src/tasks/build.rs @@ -361,23 +361,7 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker { actions.log_line(&line); } - // TODO: this belongs in the nix module. - let status = match spawned.wait() { - Ok(s) => match s.code() { - Some(0) => BuildStatus::Success, - Some(100) => BuildStatus::Failure, // nix permanent failure - Some(101) => BuildStatus::TimedOut, // nix build timedout - Some(i) => BuildStatus::UnexpectedError { - err: format!("command failed with exit code {}", i), - }, - None => BuildStatus::UnexpectedError { - err: "unexpected build failure".into(), - }, - }, - e => BuildStatus::UnexpectedError { - err: format!("failed on interior command {:?}", e), - }, - }; + let status = nix::wait_for_build_status(spawned); info!("ok built ({:?}), building", status); info!("Lines:"); From 52e2105df7fdf9041e0b1b936de668d24d198ddd Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 21:21:40 +0200 Subject: [PATCH 07/10] silence some clippy warnings It looks like the current version of rustc/clippy seems the include expanded macros (like tracing) in the complexity. None of these warnings show up with rust 1.42.0. --- ofborg/src/asynccmd.rs | 2 ++ ofborg/src/bin/builder.rs | 2 ++ ofborg/src/bin/mass-rebuilder.rs | 2 ++ ofborg/src/tasks/build.rs | 2 ++ ofborg/src/tasks/evaluate.rs | 2 ++ 5 files changed, 10 insertions(+) diff --git a/ofborg/src/asynccmd.rs b/ofborg/src/asynccmd.rs index b457d4a..8184ac6 100644 --- a/ofborg/src/asynccmd.rs +++ b/ofborg/src/asynccmd.rs @@ -149,6 +149,8 @@ impl SpawnedAsyncCmd { } } +// FIXME: remove with rust/cargo update +#[allow(clippy::cognitive_complexity)] fn block_on_waiters( monitor_rx: mpsc::Receiver<(WaitTarget, WaitResult<()>)>, mut waiters: HashMap>, diff --git a/ofborg/src/bin/builder.rs b/ofborg/src/bin/builder.rs index 7b4a9b3..2a22c79 100644 --- a/ofborg/src/bin/builder.rs +++ b/ofborg/src/bin/builder.rs @@ -9,6 +9,8 @@ use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; use ofborg::easylapin; use ofborg::{checkout, config, tasks}; +// FIXME: remove with rust/cargo update +#[allow(clippy::cognitive_complexity)] fn main() -> Result<(), Box> { ofborg::setup_log(); diff --git a/ofborg/src/bin/mass-rebuilder.rs b/ofborg/src/bin/mass-rebuilder.rs index 7c098b6..8db5be9 100644 --- a/ofborg/src/bin/mass-rebuilder.rs +++ b/ofborg/src/bin/mass-rebuilder.rs @@ -12,6 +12,8 @@ use std::process; use amqp::Basic; use tracing::{error, info}; +// FIXME: remove with rust/cargo update +#[allow(clippy::cognitive_complexity)] fn main() { let memory_info = sys_info::mem_info().expect("Unable to get memory information from OS"); diff --git a/ofborg/src/tasks/build.rs b/ofborg/src/tasks/build.rs index cce1925..4ab29c1 100644 --- a/ofborg/src/tasks/build.rs +++ b/ofborg/src/tasks/build.rs @@ -271,6 +271,8 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker { } } + // FIXME: remove with rust/cargo update + #[allow(clippy::cognitive_complexity)] fn consumer( &self, job: &buildjob::BuildJob, diff --git a/ofborg/src/tasks/evaluate.rs b/ofborg/src/tasks/evaluate.rs index a5bf6ad..4422f3f 100644 --- a/ofborg/src/tasks/evaluate.rs +++ b/ofborg/src/tasks/evaluate.rs @@ -246,6 +246,8 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { } } + // FIXME: remove with rust/cargo update + #[allow(clippy::cognitive_complexity)] fn evaluate_job(&mut self) -> Result { let job = self.job; let repo = self From 72b41d9ec15a83f83e04a7718167d78508c4d045 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 1 May 2020 22:27:02 +0200 Subject: [PATCH 08/10] add json logging --- Cargo.nix | 5 ++++- ofborg/Cargo.toml | 2 +- ofborg/src/lib.rs | 22 +++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Cargo.nix b/Cargo.nix index 10c1aaf..9f40397 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -160,7 +160,10 @@ rec { sys_info."${deps.ofborg."0.1.9".sys_info}".default = true; tempfile."${deps.ofborg."0.1.9".tempfile}".default = true; tracing."${deps.ofborg."0.1.9".tracing}".default = true; - tracing_subscriber."${deps.ofborg."0.1.9".tracing_subscriber}".default = true; + tracing_subscriber = fold recursiveUpdate {} [ + { "${deps.ofborg."0.1.9".tracing_subscriber}"."json" = true; } + { "${deps.ofborg."0.1.9".tracing_subscriber}".default = true; } + ]; uuid = fold recursiveUpdate {} [ { "${deps.ofborg."0.1.9".uuid}"."v4" = true; } { "${deps.ofborg."0.1.9".uuid}".default = true; } diff --git a/ofborg/Cargo.toml b/ofborg/Cargo.toml index 6108122..097978e 100644 --- a/ofborg/Cargo.toml +++ b/ofborg/Cargo.toml @@ -18,7 +18,7 @@ serde_derive = "1.0" serde_json = "1.0" tempfile = "2.2.0" tracing = "0.1.13" -tracing-subscriber = "0.2.5" +tracing-subscriber = { version = "0.2.5", features = ["json"] } hubcaps = { git = "https://github.com/grahamc/hubcaps.git" } #hubcaps = { path = "../../../grahamc/hubcaps/" } # for testing patches hyper = "0.10.*" diff --git a/ofborg/src/lib.rs b/ofborg/src/lib.rs index 4f15971..35928c3 100644 --- a/ofborg/src/lib.rs +++ b/ofborg/src/lib.rs @@ -11,6 +11,8 @@ extern crate serde_derive; #[macro_use] extern crate nom; +use std::env; + use tracing_subscriber::prelude::*; use tracing_subscriber::EnvFilter; @@ -88,15 +90,25 @@ pub mod ofborg { } pub fn setup_log() { - let fmt_layer = tracing_subscriber::fmt::layer(); let filter_layer = EnvFilter::try_from_default_env() .or_else(|_| EnvFilter::try_new("info")) .unwrap(); - tracing_subscriber::registry() - .with(filter_layer) - .with(fmt_layer) - .init(); + let log_json = env::var("RUST_LOG_JSON").map_or(false, |s| s == "1"); + + if log_json { + let fmt_layer = tracing_subscriber::fmt::layer().json(); + tracing_subscriber::registry() + .with(filter_layer) + .with(fmt_layer) + .init(); + } else { + let fmt_layer = tracing_subscriber::fmt::layer(); + tracing_subscriber::registry() + .with(filter_layer) + .with(fmt_layer) + .init(); + } tracing::info!("Logging configured"); } From c65ec0af76407684451ae9e30ac0d8e2ef8bf204 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 2 May 2020 21:24:18 +0200 Subject: [PATCH 09/10] add basic structrue logging to evaluator --- ofborg/src/tasks/evaluate.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ofborg/src/tasks/evaluate.rs b/ofborg/src/tasks/evaluate.rs index 4422f3f..2ee5bfa 100644 --- a/ofborg/src/tasks/evaluate.rs +++ b/ofborg/src/tasks/evaluate.rs @@ -19,7 +19,7 @@ use std::time::Instant; use hubcaps::checks::CheckRunOptions; use hubcaps::gists::Gists; use hubcaps::issues::Issue; -use tracing::{error, info, warn}; +use tracing::{debug_span, error, info, warn}; pub struct EvaluationWorker { cloner: checkout::CachedCloner, @@ -249,6 +249,9 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { // FIXME: remove with rust/cargo update #[allow(clippy::cognitive_complexity)] fn evaluate_job(&mut self) -> Result { + let span = debug_span!("job", pr = ?self.job.pr.number); + let _enter = span.enter(); + let job = self.job; let repo = self .client_app From 5be617c91246e1f544d7b3750ff79b57317a14bd Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 3 May 2020 14:57:21 +0200 Subject: [PATCH 10/10] reduce publish logging to trace level Each log line is pushed to the logs exchange so this is _way_ to verbose to enable by default. --- ofborg/src/easylapin.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofborg/src/easylapin.rs b/ofborg/src/easylapin.rs index 0ef08a0..77440db 100644 --- a/ofborg/src/easylapin.rs +++ b/ofborg/src/easylapin.rs @@ -21,7 +21,7 @@ use lapin::types::{AMQPValue, FieldTable}; use lapin::{ BasicProperties, Channel, CloseOnDrop, Connection, ConnectionProperties, ExchangeKind, }; -use tracing::debug; +use tracing::{debug, trace}; pub fn from_config(cfg: &RabbitMQConfig) -> Result, lapin::Error> { let mut props = FieldTable::default(); @@ -196,7 +196,7 @@ async fn action_deliver( Action::Publish(mut msg) => { let exch = msg.exchange.take().unwrap_or_else(|| "".to_owned()); let key = msg.routing_key.take().unwrap_or_else(|| "".to_owned()); - debug!(?exch, ?key, "action publish"); + trace!(?exch, ?key, "action publish"); let mut props = BasicProperties::default().with_delivery_mode(2); // persistent.