summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock236
-rw-r--r--Cargo.toml8
-rw-r--r--NEWS.md79
-rw-r--r--debian/changelog6
-rw-r--r--deny.toml4
-rw-r--r--examples/seq/Cargo.toml3
-rw-r--r--subplot-build/Cargo.toml4
-rw-r--r--subplotlib-derive/Cargo.toml4
-rw-r--r--subplotlib/Cargo.toml8
-rw-r--r--subplotlib/src/steplibrary/files.rs11
10 files changed, 131 insertions, 232 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e819ded..f687b4e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -110,41 +110,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "chrono"
-version = "0.4.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
-dependencies = [
- "libc",
- "num-integer",
- "num-traits",
- "time 0.1.43",
- "winapi",
-]
-
-[[package]]
-name = "chrono-tz"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552"
-dependencies = [
- "chrono",
- "chrono-tz-build",
- "phf",
-]
-
-[[package]]
-name = "chrono-tz-build"
-version = "0.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069"
-dependencies = [
- "parse-zoneinfo",
- "phf",
- "phf_codegen",
-]
-
-[[package]]
name = "clap"
version = "2.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -161,9 +126,9 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
-version = "0.5.2"
+version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
+checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
dependencies = [
"cfg-if",
"crossbeam-utils",
@@ -182,10 +147,11 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.7"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"
+checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c"
dependencies = [
+ "autocfg",
"cfg-if",
"crossbeam-utils",
"lazy_static",
@@ -195,9 +161,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.7"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
+checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
dependencies = [
"cfg-if",
"lazy_static",
@@ -352,9 +318,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77"
+checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
dependencies = [
"cfg-if",
"libc",
@@ -381,7 +347,7 @@ dependencies = [
"proc-macro2",
"quote",
"syn",
- "time 0.3.7",
+ "time",
]
[[package]]
@@ -479,9 +445,9 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "1.8.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
+checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
dependencies = [
"autocfg",
"hashbrown",
@@ -519,9 +485,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.119"
+version = "0.2.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
+checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd"
[[package]]
name = "linked-hash-map"
@@ -590,25 +556,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c"
[[package]]
-name = "num-integer"
-version = "0.1.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
-dependencies = [
- "autocfg",
- "num-traits",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
name = "num_cpus"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -620,9 +567,9 @@ dependencies = [
[[package]]
name = "num_threads"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c539a50b93a303167eded6e8dff5220cd39447409fb659f4cd24b1f72fe4f133"
+checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0"
dependencies = [
"libc",
]
@@ -671,15 +618,6 @@ dependencies = [
]
[[package]]
-name = "parse-zoneinfo"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41"
-dependencies = [
- "regex",
-]
-
-[[package]]
name = "percent-encoding"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -729,45 +667,6 @@ dependencies = [
]
[[package]]
-name = "phf"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
-dependencies = [
- "phf_shared",
-]
-
-[[package]]
-name = "phf_codegen"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
-dependencies = [
- "phf_generator",
- "phf_shared",
-]
-
-[[package]]
-name = "phf_generator"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
-dependencies = [
- "phf_shared",
- "rand",
-]
-
-[[package]]
-name = "phf_shared"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
-dependencies = [
- "siphasher",
- "uncased",
-]
-
-[[package]]
name = "pikchr"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -825,9 +724,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.36"
+version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
+checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
dependencies = [
"unicode-xid",
]
@@ -852,9 +751,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
-version = "1.0.15"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
+checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
dependencies = [
"proc-macro2",
]
@@ -891,9 +790,9 @@ dependencies = [
[[package]]
name = "rayon"
-version = "1.5.1"
+version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90"
+checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221"
dependencies = [
"autocfg",
"crossbeam-deque",
@@ -903,22 +802,21 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.9.1"
+version = "1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e"
+checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
"crossbeam-utils",
- "lazy_static",
"num_cpus",
]
[[package]]
name = "redox_syscall"
-version = "0.2.11"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"
+checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
dependencies = [
"bitflags",
]
@@ -1019,15 +917,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
-name = "seq"
-version = "0.1.0"
-dependencies = [
- "fehler",
- "subplot-build",
- "subplotlib",
-]
-
-[[package]]
name = "serde"
version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1042,7 +931,6 @@ version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93abf9799c576f004252b2a05168d58527fb7c54de12e94b4d12fe3475ffad24"
dependencies = [
- "chrono",
"serde",
"serde_json",
]
@@ -1109,12 +997,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
[[package]]
-name = "siphasher"
-version = "0.3.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
-
-[[package]]
name = "slug"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1176,7 +1058,7 @@ dependencies = [
[[package]]
name = "subplot"
-version = "0.3.1"
+version = "0.4.0"
dependencies = [
"anyhow",
"base64",
@@ -1202,13 +1084,13 @@ dependencies = [
"tempfile-fast",
"tera",
"thiserror",
- "time 0.3.7",
+ "time",
"walkdir",
]
[[package]]
name = "subplot-build"
-version = "0.1.0"
+version = "0.4.0"
dependencies = [
"subplot",
"tempfile",
@@ -1216,11 +1098,19 @@ dependencies = [
]
[[package]]
+name = "subplot-seq-example"
+version = "0.1.0"
+dependencies = [
+ "fehler",
+ "subplot-build",
+ "subplotlib",
+]
+
+[[package]]
name = "subplotlib"
-version = "0.1.1"
+version = "0.4.0"
dependencies = [
"base64",
- "chrono",
"fehler",
"filetime",
"fs2",
@@ -1234,12 +1124,13 @@ dependencies = [
"subplot-build",
"subplotlib-derive",
"tempfile",
+ "time",
"unescape",
]
[[package]]
name = "subplotlib-derive"
-version = "0.1.0"
+version = "0.4.0"
dependencies = [
"fehler",
"proc-macro2",
@@ -1249,9 +1140,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.86"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
+checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"
dependencies = [
"proc-macro2",
"quote",
@@ -1289,8 +1180,6 @@ version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3cac831b615c25bcef632d1cabf864fa05813baad3d526829db18eb70e8b58d"
dependencies = [
- "chrono",
- "chrono-tz",
"globwalk",
"humansize",
"lazy_static",
@@ -1365,19 +1254,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.1.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
-dependencies = [
- "libc",
- "winapi",
-]
-
-[[package]]
-name = "time"
-version = "0.3.7"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d"
+checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd"
dependencies = [
"itoa",
"libc",
@@ -1387,15 +1266,15 @@ dependencies = [
[[package]]
name = "time-macros"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6"
+checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"
[[package]]
name = "tracing"
-version = "0.1.32"
+version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f"
+checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
dependencies = [
"cfg-if",
"pin-project-lite",
@@ -1416,9 +1295,9 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.23"
+version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c"
+checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
dependencies = [
"lazy_static",
"valuable",
@@ -1437,9 +1316,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.9"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce"
+checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
dependencies = [
"ansi_term",
"lazy_static",
@@ -1466,15 +1345,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
[[package]]
-name = "uncased"
-version = "0.9.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0"
-dependencies = [
- "version_check",
-]
-
-[[package]]
name = "unescape"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 7a1a297..523794a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subplot"
-version = "0.3.1"
+version = "0.4.0"
authors = [
"Lars Wirzenius <liw@liw.fi>",
"Daniel Silverstone <dsilvers@digital-scurf.org>",
@@ -38,7 +38,7 @@ pulldown-cmark = "0.9.0"
regex = "1"
roadmap = "0.4"
serde = { version = "1.0.101", features = ["derive"] }
-serde-aux = "3.0"
+serde-aux = { version = "3.0", default-features = false }
serde_json = "1.0"
serde_yaml = "0.8.11"
structopt = "0.3"
@@ -50,7 +50,9 @@ env_logger = "0.9.0"
[dependencies.tera]
version = "1"
-default-features = true
+default-features = false
+# Expand out tera's default featurs, except for chrono related ones
+features = ["slug", "percent-encoding", "humansize", "rand"]
[build-dependencies]
walkdir = "2"
diff --git a/NEWS.md b/NEWS.md
index 4707e34..416673c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,14 +4,34 @@ This file summarises the changes between released versions of Subplot and its
associated libraries, especially with regards to changes visible to
the user of the Subplot software.
+# Version 0.4.0, released XXXX-XX-XX
+
+- The largest change from the previous release is that Rust based
+ subplot scenario test suites are now considered supported.
+ You can find an example of this in the `examples/seq` project in
+ the Subplot source code.
+
+- To achieve this, bindings are now "polyglot" in the sense that they
+ are not language specific, though some bindings may only provide
+ implementations for particular languages (e.g. the daemon bindings
+ currently only support Python)
+
+- Subplot considers Rust 1.48.0 to be its MSRV. This is to enable
+ integration into certain distributions and to work with other projects
+ whose MSRVs are around that value.
+
+- A number of quality of life improvements around warning delivery,
+ template handling, etc. have been made. For the full details, see
+ the Git changelog.
+
# Version 0.3.1, released 2021-11-16
-* The primary purpose of this release is to make the `PATH` bug fix
+- The primary purpose of this release is to make the `PATH` bug fix
available via crates.io, to fix use of Subplot in the Sequoia-PGP
project. There are no breaking changes, so only the patch level of
the version number is incremented.
-* The licence of Subplot has been changed to
+- The licence of Subplot has been changed to
[MIT-0](https://mit-license.org/), to make it as simple as possible
to use Subplot on other projects, without having to worry about
license compatibility. Previously, this was technically possible,
@@ -22,7 +42,7 @@ the user of the Subplot software.
though they would favor a copyleft licence otherwise, they're
willing to compromise this time.
-* A bug has been fixed in the Rust `lib/runcmd` function
+- A bug has been fixed in the Rust `lib/runcmd` function
implementation to prepend a directory to the `PATH`, in the
`subplotlib::steplibrary::runcmd::try_to_run_in` function. The bug
meant that the directories in `PATH` ended up in the wrong order.
@@ -35,7 +55,7 @@ This is still an ALPHA quality release, and includes breaking changes.
You definitely need to pay attention to these changes.
-* Subplot is moving to libraries and subplots being able to support
+- Subplot is moving to libraries and subplots being able to support
multiple step implementation languages at once. In this release,
bindings can indicate different functions for each language. Note
that a binding only needs to support one language. The new binding
@@ -52,7 +72,7 @@ You definitely need to pay attention to these changes.
cleanup: somelib::foo_cleanup
```
-* The Subplot code generator now uses the `pulldown-cmark` crate for
+- The Subplot code generator now uses the `pulldown-cmark` crate for
parsing Markdown input. The reason for this change is to not have to
have Pandoc installed in a CI or other environment that only
generates and runs test programs.
@@ -70,7 +90,7 @@ You definitely need to pay attention to these changes.
of Subplot is likely to introduce further changes, and we will
document the new metadata format then.
-* The generated test programs no longer clear the environment
+- The generated test programs no longer clear the environment
variables before running scenarios. This is partly to allow Subplot
to be more easily ported to operating systems other than Debian
(such as NixOS, but also Windows and macOS), but also because
@@ -80,7 +100,7 @@ You definitely need to pay attention to these changes.
where it is run: what software is installed, what services are
available, etc.
-* Subplot code generation now refuses documents that have no
+- Subplot code generation now refuses documents that have no
scenarios. Document generation still accepts them so that Subplot
can be used to produce typeset documents and web pages.
@@ -91,55 +111,54 @@ documents. They affect all uses of Subplot, regardless of step
implementation language and whether Subplot code or document
generation is used.
-* After a bug fix, Subplot now handles better the input files being
+- After a bug fix, Subplot now handles better the input files being
elsewhere than the current directory. If the Markdown input file is
in `foo/bar/yo.md`, the files referred to from the input file are
looked up relative to `foo/bar` instead of the current working
directory.
-* Subplot now has initial support for logging to make it easier to
+- Subplot now has initial support for logging to make it easier to
find out what it's doing, when it's doing something surprising. The
environment variables `SUBPLOT_LOG`, `SUBPLOT_LOG_FILE`, and
`SUBPLOT_LOG_FORMAT` (`oneline`, `json`, or `pretty`). What Subplot
logs is still rudimentary but will be improved over time. We'd
welcome suggestions.
-* The Subplot Debian package now builds in the resource into the
+- The Subplot Debian package now builds in the resource into the
Subplot binary.
-* Document titles can now use markup to indicate `literal` text.
+- Document titles can now use markup to indicate `literal` text.
-* Subplot now automatically handles versions of Pandoc that don't have
+- Subplot now automatically handles versions of Pandoc that don't have
a separate `pandoc-citeproc` binary, and want the `--citeproc`
option instead.
-* Subplot now works with version 1.48.0 of the Rust language and
+- Subplot now works with version 1.48.0 of the Rust language and
toolchain, in order to make it possible for the Sequoia-PGP project
to use Subplot.
## Python support
-* The generated Python test program now supports the `--run-all`
+- The generated Python test program now supports the `--run-all`
(`-k`) option to run all scenarios even if one or more fail.
## Rust support
-* Subplot now provides the `subplot-build` crate, for using Subplot
+- Subplot now provides the `subplot-build` crate, for using Subplot
code generation from another project's `build.rs` script.
-* We are in the process of elevating Rust into a supported language,
+- We are in the process of elevating Rust into a supported language,
so that it will be on par with Python. This release does not get
there, but starts the process.
## Bash support
-* We've not made much effort to improve the Bash support (modulo the
+- We've not made much effort to improve the Bash support (modulo the
environment cleanup). Compared to Python and Rust it is not a
well-support language in Subplot. Lars and Daniel do not feel it is
a target worth spending much of their free time on, but would
welcome help with that.
-
# Version 0.2.2, released 2021-08-07
This is release is meant for use by people other than Subplot's own
@@ -149,41 +168,41 @@ breaking changes in future releases.
## General
-* When a scenario step matches more than one binding, the error
+- When a scenario step matches more than one binding, the error
message now lists all the matching bindings to make it easier for
the user to fix the problem. (By Lars Wirzenius)
-* The documentation now explains core concepts relevant to Subplot,
+- The documentation now explains core concepts relevant to Subplot,
and suggests an initial workflow for a project using Subplot. (By
Lars Wirzenius)
## Python support
-* The `lib/daemon` Subplot library now uses custom Python code instead
+- The `lib/daemon` Subplot library now uses custom Python code instead
of the netcat tool. This removes a dependency, and also avoids the
problem of there being at least two more or less incompatible
versions of netcat in common use. (By Alexander Batischev)
-* The `lib/daemon` library now has a way to pass environment variables
+- The `lib/daemon` library now has a way to pass environment variables
to the daemon. (By Alexander Batischev)
## Bash support
-* The documentation now makes it clearer that the `files_get`
+- The documentation now makes it clearer that the `files_get`
function returns the contents of the embedded file and not a
filename. (By Richard Maw)
-* Some spelling and other language mistakes have been fixed in the
+- Some spelling and other language mistakes have been fixed in the
documentation for Bash support. (By Richard Maw)
-* The `dict` helper functions can now read embedded files. (By Richard
+- The `dict` helper functions can now read embedded files. (By Richard
Maw)
-* The generated Bash test program now supports the `--env` option to
+- The generated Bash test program now supports the `--env` option to
let the user pass in environment variables when invoking the test
program. (By Richard Maw)
-* Assertion functions now return an error rather then terminating the
+- Assertion functions now return an error rather then terminating the
test program. This lets cleanups run. (By Richard Maw)
# Version 0.2.1, released 2021-07-11
@@ -191,17 +210,17 @@ breaking changes in future releases.
This is the first release meant for use by people other than Subplot's
own developers.
-* The locations of the `dot` and `plantuml` programs and for the Java
+- The locations of the `dot` and `plantuml` programs and for the Java
byte code interpreter can now be configured when Subplot is invoked,
which is useful when they're not installed in the locations where
Debian puts them. Those programs are used by Subplot to render
diagrams.
-* The `./check` script now outputs the last one hundred lines or so of
+- The `./check` script now outputs the last one hundred lines or so of
the log file produced by the generated test program, if that program
fails. This makes it easier to debug failures under CI.
-* Additionally, there have been some minor tweaks only visible to
+- Additionally, there have been some minor tweaks only visible to
those developing Subplot itself.
# Version 0.2.0, released 2021-06-12
diff --git a/debian/changelog b/debian/changelog
index 9f162d6..86a6299 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+subplot (0.4.0) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Daniel Silverstone <dsilvers@digital-scurf.org> Fri, 15 April 2022 15:00:00 +0100
+
subplot (0.3.1) unstable; urgency=medium
* New upstream release.
diff --git a/deny.toml b/deny.toml
index d8a8d4b..6af795f 100644
--- a/deny.toml
+++ b/deny.toml
@@ -5,10 +5,6 @@ unsound = "warn"
yanked = "allow"
notice = "warn"
severity-threshold = "medium"
-ignore = [
- "RUSTSEC-2020-0071",
- "RUSTSEC-2020-0159",
-]
[licenses]
unlicensed = "deny"
diff --git a/examples/seq/Cargo.toml b/examples/seq/Cargo.toml
index 7e2e78c..2d4696a 100644
--- a/examples/seq/Cargo.toml
+++ b/examples/seq/Cargo.toml
@@ -1,7 +1,8 @@
[package]
-name = "seq"
+name = "subplot-seq-example"
version = "0.1.0"
edition = "2021"
+license = "MIT-0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/subplot-build/Cargo.toml b/subplot-build/Cargo.toml
index 6faca35..768e08e 100644
--- a/subplot-build/Cargo.toml
+++ b/subplot-build/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subplot-build"
-version = "0.1.0"
+version = "0.4.0"
authors = [
"Lars Wirzenius <liw@liw.fi>",
"Daniel Silverstone <dsilvers@digital-scurf.org>",
@@ -14,6 +14,6 @@ repository = "https://gitlab.com/subplot/subplot"
[dependencies]
-subplot = { version="0.3.1", path = ".." }
+subplot = { version = "0.4.0", path = ".." }
tracing = "0.1"
tempfile = "3.1.0"
diff --git a/subplotlib-derive/Cargo.toml b/subplotlib-derive/Cargo.toml
index ce23b65..3ee596f 100644
--- a/subplotlib-derive/Cargo.toml
+++ b/subplotlib-derive/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subplotlib-derive"
-version = "0.1.0"
+version = "0.4.0"
authors = [
"Lars Wirzenius <liw@liw.fi>",
"Daniel Silverstone <dsilvers@digital-scurf.org>",
@@ -17,7 +17,7 @@ repository = "https://gitlab.com/subplot/subplot"
proc-macro = true
[dependencies]
-syn = {version= "1", features=["full"]}
+syn = { version = "1", features = ["full"] }
quote = "1"
proc-macro2 = "1"
fehler = "1"
diff --git a/subplotlib/Cargo.toml b/subplotlib/Cargo.toml
index ed3fb8a..7639742 100644
--- a/subplotlib/Cargo.toml
+++ b/subplotlib/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subplotlib"
-version = "0.1.1"
+version = "0.4.0"
authors = [
"Lars Wirzenius <liw@liw.fi>",
"Daniel Silverstone <dsilvers@digital-scurf.org>",
@@ -16,13 +16,13 @@ repository = "https://gitlab.com/subplot/subplot"
[dependencies]
fehler = "1"
-subplotlib-derive = { version = "0.1", path = "../subplotlib-derive" }
+subplotlib-derive = { version = "0.4.0", path = "../subplotlib-derive" }
lazy_static = "1"
base64 = "0.13"
state = "0.5"
tempfile = "3.1"
fs2 = "0.4"
-chrono = "0.4"
+time = { version = "0.3", features = ["parsing"] }
filetime = "0.2"
regex = "1.4"
shell-words = "1.0"
@@ -32,7 +32,7 @@ remove_dir_all = "0.7"
[build-dependencies]
glob = "0.3"
-subplot-build = { version = "0.1", path = "../subplot-build" }
+subplot-build = { version = "0.4.0", path = "../subplot-build" }
[dev-dependencies]
serde_json = "1.0"
diff --git a/subplotlib/src/steplibrary/files.rs b/subplotlib/src/steplibrary/files.rs
index 991cd88..1a55f7a 100644
--- a/subplotlib/src/steplibrary/files.rs
+++ b/subplotlib/src/steplibrary/files.rs
@@ -10,9 +10,10 @@ use std::io::{self, Write};
use std::path::PathBuf;
use std::time::{Duration, SystemTime};
-use chrono::{TimeZone, Utc};
use filetime::FileTime;
use regex::Regex;
+use time::macros::format_description;
+use time::OffsetDateTime;
pub use crate::prelude::*;
@@ -86,8 +87,12 @@ pub fn create_from_embedded_with_other_name(
/// If the file does not exist, it will be created.
#[step]
pub fn touch_with_timestamp(context: &Datadir, filename: &str, mtime: &str) {
- let ts = Utc.datetime_from_str(mtime, "%Y-%m-%d %H:%M:%S")?;
- let (secs, nanos) = (ts.timestamp(), ts.timestamp_subsec_nanos());
+ let fd = format_description!(
+ "[year]-[month]-[day] [hour]:[minute]:[second] [offset_hour]:[offset_minute]"
+ );
+ let full_time = format!("{} +00:00", mtime);
+ let ts = OffsetDateTime::parse(&full_time, &fd)?;
+ let (secs, nanos) = (ts.unix_timestamp(), 0);
let mtime = FileTime::from_unix_time(secs, nanos);
let full_path = context.canonicalise_filename(filename)?;
// If the file doesn't exist, create it