From b7010aae8bc4c546503b9736aafe99a4fc7273bf Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 25 Feb 2020 09:57:51 -0800 Subject: Move old stuff to archive folder --- .gitignore | 2 - Cargo.lock | 433 -------------------------------------------- Cargo.toml | 15 -- archive/.gitignore | 2 + archive/Cargo.lock | 433 ++++++++++++++++++++++++++++++++++++++++++++ archive/Cargo.toml | 15 ++ archive/ci/install_cmake.sh | 7 + archive/src/main.rs | 136 ++++++++++++++ archive/tests/1/a.f90 | 11 ++ archive/tests/1/b.f90 | 10 + archive/tests/1/fpm.toml | 2 + archive/tests/1/main.f90 | 8 + archive/tests/2/fpm.toml | 2 + archive/tests/2/main.f90 | 5 + archive/tests/cli.rs | 103 +++++++++++ ci/install_cmake.sh | 7 - src/main.rs | 136 -------------- tests/1/a.f90 | 11 -- tests/1/b.f90 | 10 - tests/1/fpm.toml | 2 - tests/1/main.f90 | 8 - tests/2/fpm.toml | 2 - tests/2/main.f90 | 5 - tests/cli.rs | 103 ----------- 24 files changed, 734 insertions(+), 734 deletions(-) delete mode 100644 .gitignore delete mode 100644 Cargo.lock delete mode 100644 Cargo.toml create mode 100644 archive/.gitignore create mode 100644 archive/Cargo.lock create mode 100644 archive/Cargo.toml create mode 100755 archive/ci/install_cmake.sh create mode 100644 archive/src/main.rs create mode 100644 archive/tests/1/a.f90 create mode 100644 archive/tests/1/b.f90 create mode 100644 archive/tests/1/fpm.toml create mode 100644 archive/tests/1/main.f90 create mode 100644 archive/tests/2/fpm.toml create mode 100644 archive/tests/2/main.f90 create mode 100644 archive/tests/cli.rs delete mode 100755 ci/install_cmake.sh delete mode 100644 src/main.rs delete mode 100644 tests/1/a.f90 delete mode 100644 tests/1/b.f90 delete mode 100644 tests/1/fpm.toml delete mode 100644 tests/1/main.f90 delete mode 100644 tests/2/fpm.toml delete mode 100644 tests/2/main.f90 delete mode 100644 tests/cli.rs diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 53eaa21..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -**/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 048207e..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,433 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "aho-corasick" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.3.0 (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 = "assert_cmd" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "autocfg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "clap" -version = "2.33.0" -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)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "escargot" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "float-cmp" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fpm" -version = "0.1.0" -dependencies = [ - "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hermit-abi" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itoa" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.66" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "normalize-line-endings" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "num-traits" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "predicates" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "predicates-core" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "predicates-tree" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro-error" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro-error-attr 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro-error-attr" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.13 (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-syntax" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustversion" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ryu" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "structopt" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "structopt-derive" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn-mid" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -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)", -] - -[[package]] -name = "toml" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "treeline" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "vec_map" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" -"checksum float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" -"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" -"checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" -"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -"checksum predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" -"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" -"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum proc-macro-error 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1b79a464461615532fcc8a6ed8296fa66cc12350c18460ab3f4594a6cee0fcb6" -"checksum proc-macro-error-attr 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23832e5eae6bac56bbac190500eef1aaede63776b5cd131eaa4ee7fe120cd892" -"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87" -"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90" -"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" -"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" -"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" -"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" -"checksum serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "eab8f15f15d6c41a154c1b128a22f2dfabe350ef53c40953d84e36155c91192b" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "df136b42d76b1fbea72e2ab3057343977b04b4a2e00836c3c7c0673829572713" -"checksum structopt-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd50a87d2f7b8958055f3e73a963d78feaccca3836767a9069844e34b5b03c0a" -"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" -"checksum syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd3937748a7eccff61ba5b90af1a20dbf610858923a9192ea0ecb0cb77db1d0" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" -"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 8baaf30..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "fpm" -version = "0.1.0" -authors = ["Ondřej Čertík "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -structopt = "0.3.7" -toml = "0.5" - -[dev-dependencies] -assert_cmd = "0.10" -predicates = "1" diff --git a/archive/.gitignore b/archive/.gitignore new file mode 100644 index 0000000..53eaa21 --- /dev/null +++ b/archive/.gitignore @@ -0,0 +1,2 @@ +/target +**/*.rs.bk diff --git a/archive/Cargo.lock b/archive/Cargo.lock new file mode 100644 index 0000000..048207e --- /dev/null +++ b/archive/Cargo.lock @@ -0,0 +1,433 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "aho-corasick" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.3.0 (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 = "assert_cmd" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "clap" +version = "2.33.0" +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)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "escargot" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "float-cmp" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fpm" +version = "0.1.0" +dependencies = [ + "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hermit-abi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "itoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libc" +version = "0.2.66" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "normalize-line-endings" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "num-traits" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "predicates" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "predicates-core" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "predicates-tree" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro-error" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-error-attr 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro-error-attr" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.13 (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-syntax" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rustversion" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ryu" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_derive" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_json" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "structopt" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "structopt-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn-mid" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +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)", +] + +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "treeline" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "vec_map" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" +"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +"checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" +"checksum float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" +"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" +"checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" +"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" +"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +"checksum proc-macro-error 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1b79a464461615532fcc8a6ed8296fa66cc12350c18460ab3f4594a6cee0fcb6" +"checksum proc-macro-error-attr 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23832e5eae6bac56bbac190500eef1aaede63776b5cd131eaa4ee7fe120cd892" +"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87" +"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90" +"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" +"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "eab8f15f15d6c41a154c1b128a22f2dfabe350ef53c40953d84e36155c91192b" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "df136b42d76b1fbea72e2ab3057343977b04b4a2e00836c3c7c0673829572713" +"checksum structopt-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd50a87d2f7b8958055f3e73a963d78feaccca3836767a9069844e34b5b03c0a" +"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" +"checksum syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd3937748a7eccff61ba5b90af1a20dbf610858923a9192ea0ecb0cb77db1d0" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" +"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/archive/Cargo.toml b/archive/Cargo.toml new file mode 100644 index 0000000..8baaf30 --- /dev/null +++ b/archive/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "fpm" +version = "0.1.0" +authors = ["Ondřej Čertík "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +structopt = "0.3.7" +toml = "0.5" + +[dev-dependencies] +assert_cmd = "0.10" +predicates = "1" diff --git a/archive/ci/install_cmake.sh b/archive/ci/install_cmake.sh new file mode 100755 index 0000000..9afe1e2 --- /dev/null +++ b/archive/ci/install_cmake.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +wget -qO- https://github.com/Kitware/CMake/releases/download/v3.16.3/cmake-3.16.3-Linux-x86_64.tar.gz | sudo tar xz --strip=1 -C /usr/local/ +which cmake +cmake --version diff --git a/archive/src/main.rs b/archive/src/main.rs new file mode 100644 index 0000000..340c1d3 --- /dev/null +++ b/archive/src/main.rs @@ -0,0 +1,136 @@ +use structopt::StructOpt; +use toml::Value; +use std::path::{Path, PathBuf}; +use std::env; + +#[derive(Debug, StructOpt)] +struct Cli { + /// fpm command + command: String, + + /// Directory for all generated artifacts + #[structopt(long, name="DIRECTORY", default_value = "target")] + target_dir : PathBuf, +} + +fn collect_source_files() -> Vec { + let mut files: Vec = Vec::new(); + for entry in std::fs::read_dir(".").unwrap() { + let entry = entry.unwrap(); + let path = entry.path(); + if !path.is_dir() { + let ext = match path.extension() { + None => "None", + Some(ext) => ext.to_str().unwrap(), + }; + if ext == "f90" { + files.push(path.to_str().unwrap().to_string()); + } + } + } + files +} + +fn build(target_dir: &Path) { + let target = PathBuf::from(target_dir); + println!("TARGET_DIR: {}", target_dir.to_str().unwrap()); + let value = std::fs::read_to_string("fpm.toml") + .unwrap() + .parse::().unwrap(); + println!("TOML: {:?}", value); + let files = collect_source_files(); + let mut files2: String = String::new(); + for file in &files { + println!("File: {}", file); + if !file.ends_with("main.f90") { + files2 = files2 + " ../" + &file.replace("\\", "/"); + } + } + println!("Files: {:?}", files); + let s = format!("\ +cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) + +enable_language(Fortran) + +project(p1) + +add_executable(p1 ../main.f90 {}) +", files2); + let mut cmakelists = target; + cmakelists.push("CMakeLists.txt"); + std::fs::create_dir_all(target_dir).unwrap(); + std::fs::write(cmakelists.to_str().unwrap(), s).unwrap(); + + let mut args: Vec<&str> = vec![]; + if cfg!(windows) { + args.extend(vec!["-G", "MinGW Makefiles", + "-DCMAKE_SH=CMAKE_SH-NOTFOUND"]) + }; + args.extend(vec!["-B", "build", "."]); + println!("[+] cmake {:?}", args); + let fc : String = match env::var("FC") { + Ok(val) => val, + Err(_) => "gfortran".to_string(), + }; + let output = std::process::Command::new("cmake") + .args(&args) + .current_dir(target_dir) + .env("FC", fc) + .output().unwrap(); + println!("status: {}", output.status); + println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); + println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); + if !output.status.success() { + panic!("Command failed.") + } + + println!(""); + let args = vec!["--build", "build"]; + println!("[+] cmake {:?}", args); + let output = std::process::Command::new("cmake") + .args(&args) + .current_dir(target_dir) + .output().unwrap(); + println!("status: {}", output.status); + println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); + println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); + if !output.status.success() { + panic!("Command failed.") + } +} + +fn p1_bin(target_dir: &Path) -> std::process::Command { + let mut fpm_bin_relative: std::path::PathBuf = target_dir.to_path_buf(); + fpm_bin_relative.push("build"); + fpm_bin_relative.push("p1"); + fpm_bin_relative.set_extension(std::env::consts::EXE_EXTENSION); + let fpm_bin_absolute = std::fs::canonicalize(fpm_bin_relative).unwrap(); + std::process::Command::new(fpm_bin_absolute.to_str().unwrap()) +} + +fn run(target_dir: &Path) { + let output = p1_bin(target_dir) + .current_dir(target_dir) + .output().unwrap(); + println!("status: {}", output.status); + println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); + println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); + if !output.status.success() { + panic!("Command failed.") + } +} + +fn main() { + let args = Cli::from_args(); + println!("{:?}", args); + if args.command == "build" { + println!("Command: build"); + build(args.target_dir.as_path()); + } else if args.command == "run" { + println!("Command: run"); + build(args.target_dir.as_path()); + run(args.target_dir.as_path()); + } else { + panic!("Unknown command"); + } +} diff --git a/archive/tests/1/a.f90 b/archive/tests/1/a.f90 new file mode 100644 index 0000000..a4f64a2 --- /dev/null +++ b/archive/tests/1/a.f90 @@ -0,0 +1,11 @@ +module a +use b, only: g +implicit none + +contains + + subroutine f() + call g() + end subroutine + +end module diff --git a/archive/tests/1/b.f90 b/archive/tests/1/b.f90 new file mode 100644 index 0000000..8b57633 --- /dev/null +++ b/archive/tests/1/b.f90 @@ -0,0 +1,10 @@ +module b +implicit none + +contains + + subroutine g() + print *, "g()" + end subroutine + +end module diff --git a/archive/tests/1/fpm.toml b/archive/tests/1/fpm.toml new file mode 100644 index 0000000..c7d48a4 --- /dev/null +++ b/archive/tests/1/fpm.toml @@ -0,0 +1,2 @@ +[dependencies] +a = "4.0.0" diff --git a/archive/tests/1/main.f90 b/archive/tests/1/main.f90 new file mode 100644 index 0000000..d886be3 --- /dev/null +++ b/archive/tests/1/main.f90 @@ -0,0 +1,8 @@ +program test1 +use a, only: f +implicit none + +call f() + +print *, "TEST1 OK" +end diff --git a/archive/tests/2/fpm.toml b/archive/tests/2/fpm.toml new file mode 100644 index 0000000..c7d48a4 --- /dev/null +++ b/archive/tests/2/fpm.toml @@ -0,0 +1,2 @@ +[dependencies] +a = "4.0.0" diff --git a/archive/tests/2/main.f90 b/archive/tests/2/main.f90 new file mode 100644 index 0000000..bd820eb --- /dev/null +++ b/archive/tests/2/main.f90 @@ -0,0 +1,5 @@ +program test2 +implicit none + +print *, "TEST2 OK" +end diff --git a/archive/tests/cli.rs b/archive/tests/cli.rs new file mode 100644 index 0000000..b099721 --- /dev/null +++ b/archive/tests/cli.rs @@ -0,0 +1,103 @@ +use assert_cmd::prelude::OutputAssertExt; // Add methods on commands +use predicates::prelude::{predicate, PredicateBooleanExt}; // Used for writing assertions +#[cfg(unix)] +use std::os::unix::process::ExitStatusExt; + +pub trait Success2 { + // Our own function with better reporting of errors + fn success2(self) -> Self; +} + +#[cfg(unix)] +fn get_signal(status: std::process::ExitStatus) -> Option { + status.signal() +} + +#[cfg(not(unix))] +fn get_signal(_status: std::process::ExitStatus) -> Option { + None +} + +impl Success2 for assert_cmd::assert::Assert { + fn success2(self) -> Self { + if !self.get_output().status.success() { + let output = self.get_output(); + let code = output.status.code(); + println!("status: {}", output.status); + println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); + println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); + if cfg!(unix) { + if code.is_none() { + let signal = get_signal(output.status).unwrap(); + panic!("INTERRUPTED with signal: {}", signal); + } + } + let actual_code = code.unwrap(); + println!("code: {}", actual_code); + panic!("Non zero exit code"); + } + self + } +} + +fn fpm_bin() -> std::process::Command { + let mut fpm_bin_relative: std::path::PathBuf = ["target", "debug", "fpm"].iter().collect(); + fpm_bin_relative.set_extension(std::env::consts::EXE_EXTENSION); + let fpm_bin_absolute = std::fs::canonicalize(fpm_bin_relative).unwrap(); + std::process::Command::new(fpm_bin_absolute.to_str().unwrap()) +} + +#[test] +fn test_help() { + let mut cmd = fpm_bin(); + cmd.arg("--help"); + cmd.assert() + .success2() + .stdout( + predicate::str::contains("--help Prints help information")); +} + + +#[test] +fn test_1() { + let mut build = fpm_bin(); + build.arg("build") + .arg("--target-dir") + .arg("build-test") + .current_dir("tests/1"); + build.assert() + .success2() + .stdout(predicate::str::contains("Built target p1") + .and(predicate::str::contains("TEST1 OK").not())); + + let mut run = fpm_bin(); + run.arg("run") + .arg("--target-dir") + .arg("build-test") + .current_dir("tests/1"); + run.assert() + .success2() + .stdout(predicate::str::contains("TEST1 OK")); +} + +#[test] +fn test_2() { + let mut build = fpm_bin(); + build.arg("build") + .arg("--target-dir") + .arg("build-test") + .current_dir("tests/2"); + build.assert() + .success2() + .stdout(predicate::str::contains("Built target p1") + .and(predicate::str::contains("TEST2 OK").not())); + + let mut run = fpm_bin(); + run.arg("run") + .arg("--target-dir") + .arg("build-test") + .current_dir("tests/2"); + run.assert() + .success2() + .stdout(predicate::str::contains("TEST2 OK")); +} diff --git a/ci/install_cmake.sh b/ci/install_cmake.sh deleted file mode 100755 index 9afe1e2..0000000 --- a/ci/install_cmake.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -ex - -wget -qO- https://github.com/Kitware/CMake/releases/download/v3.16.3/cmake-3.16.3-Linux-x86_64.tar.gz | sudo tar xz --strip=1 -C /usr/local/ -which cmake -cmake --version diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 340c1d3..0000000 --- a/src/main.rs +++ /dev/null @@ -1,136 +0,0 @@ -use structopt::StructOpt; -use toml::Value; -use std::path::{Path, PathBuf}; -use std::env; - -#[derive(Debug, StructOpt)] -struct Cli { - /// fpm command - command: String, - - /// Directory for all generated artifacts - #[structopt(long, name="DIRECTORY", default_value = "target")] - target_dir : PathBuf, -} - -fn collect_source_files() -> Vec { - let mut files: Vec = Vec::new(); - for entry in std::fs::read_dir(".").unwrap() { - let entry = entry.unwrap(); - let path = entry.path(); - if !path.is_dir() { - let ext = match path.extension() { - None => "None", - Some(ext) => ext.to_str().unwrap(), - }; - if ext == "f90" { - files.push(path.to_str().unwrap().to_string()); - } - } - } - files -} - -fn build(target_dir: &Path) { - let target = PathBuf::from(target_dir); - println!("TARGET_DIR: {}", target_dir.to_str().unwrap()); - let value = std::fs::read_to_string("fpm.toml") - .unwrap() - .parse::().unwrap(); - println!("TOML: {:?}", value); - let files = collect_source_files(); - let mut files2: String = String::new(); - for file in &files { - println!("File: {}", file); - if !file.ends_with("main.f90") { - files2 = files2 + " ../" + &file.replace("\\", "/"); - } - } - println!("Files: {:?}", files); - let s = format!("\ -cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) - -enable_language(Fortran) - -project(p1) - -add_executable(p1 ../main.f90 {}) -", files2); - let mut cmakelists = target; - cmakelists.push("CMakeLists.txt"); - std::fs::create_dir_all(target_dir).unwrap(); - std::fs::write(cmakelists.to_str().unwrap(), s).unwrap(); - - let mut args: Vec<&str> = vec![]; - if cfg!(windows) { - args.extend(vec!["-G", "MinGW Makefiles", - "-DCMAKE_SH=CMAKE_SH-NOTFOUND"]) - }; - args.extend(vec!["-B", "build", "."]); - println!("[+] cmake {:?}", args); - let fc : String = match env::var("FC") { - Ok(val) => val, - Err(_) => "gfortran".to_string(), - }; - let output = std::process::Command::new("cmake") - .args(&args) - .current_dir(target_dir) - .env("FC", fc) - .output().unwrap(); - println!("status: {}", output.status); - println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); - println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); - if !output.status.success() { - panic!("Command failed.") - } - - println!(""); - let args = vec!["--build", "build"]; - println!("[+] cmake {:?}", args); - let output = std::process::Command::new("cmake") - .args(&args) - .current_dir(target_dir) - .output().unwrap(); - println!("status: {}", output.status); - println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); - println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); - if !output.status.success() { - panic!("Command failed.") - } -} - -fn p1_bin(target_dir: &Path) -> std::process::Command { - let mut fpm_bin_relative: std::path::PathBuf = target_dir.to_path_buf(); - fpm_bin_relative.push("build"); - fpm_bin_relative.push("p1"); - fpm_bin_relative.set_extension(std::env::consts::EXE_EXTENSION); - let fpm_bin_absolute = std::fs::canonicalize(fpm_bin_relative).unwrap(); - std::process::Command::new(fpm_bin_absolute.to_str().unwrap()) -} - -fn run(target_dir: &Path) { - let output = p1_bin(target_dir) - .current_dir(target_dir) - .output().unwrap(); - println!("status: {}", output.status); - println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); - println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); - if !output.status.success() { - panic!("Command failed.") - } -} - -fn main() { - let args = Cli::from_args(); - println!("{:?}", args); - if args.command == "build" { - println!("Command: build"); - build(args.target_dir.as_path()); - } else if args.command == "run" { - println!("Command: run"); - build(args.target_dir.as_path()); - run(args.target_dir.as_path()); - } else { - panic!("Unknown command"); - } -} diff --git a/tests/1/a.f90 b/tests/1/a.f90 deleted file mode 100644 index a4f64a2..0000000 --- a/tests/1/a.f90 +++ /dev/null @@ -1,11 +0,0 @@ -module a -use b, only: g -implicit none - -contains - - subroutine f() - call g() - end subroutine - -end module diff --git a/tests/1/b.f90 b/tests/1/b.f90 deleted file mode 100644 index 8b57633..0000000 --- a/tests/1/b.f90 +++ /dev/null @@ -1,10 +0,0 @@ -module b -implicit none - -contains - - subroutine g() - print *, "g()" - end subroutine - -end module diff --git a/tests/1/fpm.toml b/tests/1/fpm.toml deleted file mode 100644 index c7d48a4..0000000 --- a/tests/1/fpm.toml +++ /dev/null @@ -1,2 +0,0 @@ -[dependencies] -a = "4.0.0" diff --git a/tests/1/main.f90 b/tests/1/main.f90 deleted file mode 100644 index d886be3..0000000 --- a/tests/1/main.f90 +++ /dev/null @@ -1,8 +0,0 @@ -program test1 -use a, only: f -implicit none - -call f() - -print *, "TEST1 OK" -end diff --git a/tests/2/fpm.toml b/tests/2/fpm.toml deleted file mode 100644 index c7d48a4..0000000 --- a/tests/2/fpm.toml +++ /dev/null @@ -1,2 +0,0 @@ -[dependencies] -a = "4.0.0" diff --git a/tests/2/main.f90 b/tests/2/main.f90 deleted file mode 100644 index bd820eb..0000000 --- a/tests/2/main.f90 +++ /dev/null @@ -1,5 +0,0 @@ -program test2 -implicit none - -print *, "TEST2 OK" -end diff --git a/tests/cli.rs b/tests/cli.rs deleted file mode 100644 index b099721..0000000 --- a/tests/cli.rs +++ /dev/null @@ -1,103 +0,0 @@ -use assert_cmd::prelude::OutputAssertExt; // Add methods on commands -use predicates::prelude::{predicate, PredicateBooleanExt}; // Used for writing assertions -#[cfg(unix)] -use std::os::unix::process::ExitStatusExt; - -pub trait Success2 { - // Our own function with better reporting of errors - fn success2(self) -> Self; -} - -#[cfg(unix)] -fn get_signal(status: std::process::ExitStatus) -> Option { - status.signal() -} - -#[cfg(not(unix))] -fn get_signal(_status: std::process::ExitStatus) -> Option { - None -} - -impl Success2 for assert_cmd::assert::Assert { - fn success2(self) -> Self { - if !self.get_output().status.success() { - let output = self.get_output(); - let code = output.status.code(); - println!("status: {}", output.status); - println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); - println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); - if cfg!(unix) { - if code.is_none() { - let signal = get_signal(output.status).unwrap(); - panic!("INTERRUPTED with signal: {}", signal); - } - } - let actual_code = code.unwrap(); - println!("code: {}", actual_code); - panic!("Non zero exit code"); - } - self - } -} - -fn fpm_bin() -> std::process::Command { - let mut fpm_bin_relative: std::path::PathBuf = ["target", "debug", "fpm"].iter().collect(); - fpm_bin_relative.set_extension(std::env::consts::EXE_EXTENSION); - let fpm_bin_absolute = std::fs::canonicalize(fpm_bin_relative).unwrap(); - std::process::Command::new(fpm_bin_absolute.to_str().unwrap()) -} - -#[test] -fn test_help() { - let mut cmd = fpm_bin(); - cmd.arg("--help"); - cmd.assert() - .success2() - .stdout( - predicate::str::contains("--help Prints help information")); -} - - -#[test] -fn test_1() { - let mut build = fpm_bin(); - build.arg("build") - .arg("--target-dir") - .arg("build-test") - .current_dir("tests/1"); - build.assert() - .success2() - .stdout(predicate::str::contains("Built target p1") - .and(predicate::str::contains("TEST1 OK").not())); - - let mut run = fpm_bin(); - run.arg("run") - .arg("--target-dir") - .arg("build-test") - .current_dir("tests/1"); - run.assert() - .success2() - .stdout(predicate::str::contains("TEST1 OK")); -} - -#[test] -fn test_2() { - let mut build = fpm_bin(); - build.arg("build") - .arg("--target-dir") - .arg("build-test") - .current_dir("tests/2"); - build.assert() - .success2() - .stdout(predicate::str::contains("Built target p1") - .and(predicate::str::contains("TEST2 OK").not())); - - let mut run = fpm_bin(); - run.arg("run") - .arg("--target-dir") - .arg("build-test") - .current_dir("tests/2"); - run.assert() - .success2() - .stdout(predicate::str::contains("TEST2 OK")); -} -- cgit v1.2.3 From b8f3867d54bc71423734953fd6939f73e7ec669b Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 25 Feb 2020 10:01:05 -0800 Subject: Start with a new stack project --- .gitignore | 3 +++ ChangeLog.md | 3 +++ Setup.hs | 2 ++ app/Main.hs | 6 ++++++ package.yaml | 48 +++++++++++++++++++++++++++++++++++++++++ src/Lib.hs | 6 ++++++ stack.yaml | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ stack.yaml.lock | 12 +++++++++++ test/Spec.hs | 2 ++ 9 files changed, 148 insertions(+) create mode 100644 .gitignore create mode 100644 ChangeLog.md create mode 100644 Setup.hs create mode 100644 app/Main.hs create mode 100644 package.yaml create mode 100644 src/Lib.hs create mode 100644 stack.yaml create mode 100644 stack.yaml.lock create mode 100644 test/Spec.hs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..50e5ce9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.stack-work/ +fpm.cabal +*~ \ No newline at end of file diff --git a/ChangeLog.md b/ChangeLog.md new file mode 100644 index 0000000..b6fab63 --- /dev/null +++ b/ChangeLog.md @@ -0,0 +1,3 @@ +# Changelog for fpm + +## Unreleased changes diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/app/Main.hs b/app/Main.hs new file mode 100644 index 0000000..de1c1ab --- /dev/null +++ b/app/Main.hs @@ -0,0 +1,6 @@ +module Main where + +import Lib + +main :: IO () +main = someFunc diff --git a/package.yaml b/package.yaml new file mode 100644 index 0000000..ab3a1d0 --- /dev/null +++ b/package.yaml @@ -0,0 +1,48 @@ +name: fpm +version: 0.1.0.0 +github: "githubuser/fpm" +license: BSD3 +author: "Author name here" +maintainer: "example@example.com" +copyright: "2020 Author name here" + +extra-source-files: +- README.md +- ChangeLog.md + +# Metadata used when publishing your package +# synopsis: Short description of your package +# category: Web + +# To avoid duplicated efforts in documentation and dealing with the +# complications of embedding Haddock markup inside cabal files, it is +# common to point users to the README.md file. +description: Please see the README on GitHub at + +dependencies: +- base >= 4.7 && < 5 + +library: + source-dirs: src + +executables: + fpm-exe: + main: Main.hs + source-dirs: app + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - fpm + +tests: + fpm-test: + main: Spec.hs + source-dirs: test + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - fpm diff --git a/src/Lib.hs b/src/Lib.hs new file mode 100644 index 0000000..d36ff27 --- /dev/null +++ b/src/Lib.hs @@ -0,0 +1,6 @@ +module Lib + ( someFunc + ) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..465f104 --- /dev/null +++ b/stack.yaml @@ -0,0 +1,66 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# +# The location of a snapshot can be provided as a file or url. Stack assumes +# a snapshot provided as a file might change, whereas a url resource does not. +# +# resolver: ./custom-snapshot.yaml +# resolver: https://example.com/snapshots/2018-01-01.yaml +resolver: lts-15.1 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# subdirs: +# - auto-update +# - wai +packages: +- . +# Dependency packages to be pulled from upstream that are not in the resolver. +# These entries can reference officially published versions as well as +# forks / in-progress versions pinned to a git hash. For example: +# +# extra-deps: +# - acme-missiles-0.3 +# - git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# +# extra-deps: [] + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=2.1" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 0000000..7e51098 --- /dev/null +++ b/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 489011 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/1.yaml + sha256: d4ecc42b7125d68e4c3c036a08046ad0cd02ae0d9efbe3af2223a00ff8cc16f3 + original: lts-15.1 diff --git a/test/Spec.hs b/test/Spec.hs new file mode 100644 index 0000000..cd4753f --- /dev/null +++ b/test/Spec.hs @@ -0,0 +1,2 @@ +main :: IO () +main = putStrLn "Test suite not yet implemented" -- cgit v1.2.3 From 3b988c733521dedbfa4a775222edc3b6abd166a9 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 25 Feb 2020 10:05:54 -0800 Subject: CI: Install Haskell instead of Rust --- .github/workflows/CI.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fcc50b6..c73bb3b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,9 +4,6 @@ on: [push, pull_request] env: CI: "ON" # We can detect this in the build system and other vendors implement it - CMAKE_BUILD_PARALLEL_LEVEL: "2" # 2 cores on each GHA VM, enable parallel builds - CTEST_OUTPUT_ON_FAILURE: "ON" # This way we don't need a flag to ctest - CTEST_PARALLEL_LEVEL: "2" HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker HOMEBREW_NO_AUTO_UPDATE: "ON" HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" @@ -22,7 +19,6 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] gcc_v: [9] # Version of GFortran we want to use. - rust: [stable] env: FC: gfortran GCC_V: ${{ matrix.gcc_v }} @@ -31,9 +27,8 @@ jobs: - name: Checkout code uses: actions/checkout@v1 - - name: Install CMake Linux - if: contains(matrix.os, 'ubuntu') - run: ci/install_cmake.sh + - name: Install Haskell + uses: mstksg/setup-stack@v1 - name: Install GFortran Linux if: contains(matrix.os, 'ubuntu') @@ -42,16 +37,10 @@ jobs: --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ --slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V} - - - name: Install Rust - uses: hecrj/setup-rust-action@v1 - with: - rust-version: ${{ matrix.rust }} - - name: Build run: | - cargo test --verbose --no-run + stack build - name: Run tests run: | - cargo test + stack test -- cgit v1.2.3 From bbb021b74fc7009fe905b0015ad4cca85bfe0a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 25 Feb 2020 10:15:57 -0800 Subject: Update README with Haskell instructions --- README.md | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index e6e23c1..b767268 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,26 @@ A prototype version. ## How to try it out -Install Rust, then: -``` -cargo build -``` -Go to a test directory and execute: +### Install Haskell + +Install Haskell Stack from (https://haskellstack.org/). E.g., to install on +Linux without root access, follow the [manual download](https://docs.haskellstack.org/en/stable/install_and_upgrade/#manual-download_2): ``` -cd tests/1 -../../target/debug/fpm build -../../target/debug/fpm run +wget https://get.haskellstack.org/stable/linux-x86_64-static.tar.gz +tar xaf linux-x86_64-static.tar.gz ``` -And the same in the other test directory (one can also call `run` directly): +and put the `stack` binary in your path, for example by: ``` -cd tests/2 -../../target/debug/fpm run +export PATH="$PATH:`pwd`/stack-2.1.3-linux-x86_64-static/" ``` -## Development Details - -The command line interface (CLI) program `fpm` is build according to the -following Rust CLI tutorial: - -https://rust-cli.github.io/book/index.html +### Build and Test FPM -and the user API is inspired by Cargo. Here is Cargo project layout: - -https://doc.rust-lang.org/cargo/guide/project-layout.html +Build using: +``` +stack build +``` +To test: +``` +stack test +``` -- cgit v1.2.3 From 2fffd79862b5c0bf2f6d02bb2dee1f25d63b22bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 25 Feb 2020 10:57:26 -0800 Subject: CI: Install Haskell on Windows manually --- .github/workflows/CI.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c73bb3b..37ca589 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,9 +27,17 @@ jobs: - name: Checkout code uses: actions/checkout@v1 - - name: Install Haskell + - name: Install Haskell Linux / macOS + if: contains(matrix.os, 'ubuntu') or contains(matrix.os, 'macos') uses: mstksg/setup-stack@v1 + - name: Install Haskell Windows + if: contains(matrix.os, 'windows') + run: | + wget https://get.haskellstack.org/stable/windows-x86_64.zip + unzip windows-x86_64.zip + copy windows-x86_64\stack.exe %APPDATA%\local\bin + - name: Install GFortran Linux if: contains(matrix.os, 'ubuntu') run: | -- cgit v1.2.3 From 1e022ab28087ac52c2318c5030d5a74bd736ac8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 25 Feb 2020 11:06:31 -0800 Subject: CI: Use "||" instead of "or" --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 37ca589..3f6d81a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@v1 - name: Install Haskell Linux / macOS - if: contains(matrix.os, 'ubuntu') or contains(matrix.os, 'macos') + if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') uses: mstksg/setup-stack@v1 - name: Install Haskell Windows -- cgit v1.2.3 From 2d6a18354b5c848bd655bfc2a642b93699eb2b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 25 Feb 2020 11:16:21 -0800 Subject: CI: use PowerShell to download Stack --- .github/workflows/CI.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3f6d81a..946caba 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,9 +34,12 @@ jobs: - name: Install Haskell Windows if: contains(matrix.os, 'windows') run: | - wget https://get.haskellstack.org/stable/windows-x86_64.zip - unzip windows-x86_64.zip - copy windows-x86_64\stack.exe %APPDATA%\local\bin + (New-Object System.Net.WebClient).DownloadFile("https://get.haskellstack.org/stable/windows-x86_64.zip", "windows-x86_64.zip") + mkdir stack-tmp + cd stack-tmp + unzip ..\windows-x86_64.zip + copy stack.exe "C:\Program Files\Git\usr\bin" + cd .. - name: Install GFortran Linux if: contains(matrix.os, 'ubuntu') -- cgit v1.2.3 From d9cd40f9d84e104207f8ef34c6d5a4f9d1b3af4b Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 25 Feb 2020 11:18:40 -0800 Subject: Add bare minimum of command line parsing --- app/Main.hs | 41 +++++++++++++++++++++++++++++++++++++++-- package.yaml | 1 + stack.yaml | 2 +- stack.yaml.lock | 8 ++++---- 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index de1c1ab..9d9c5dc 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,6 +1,43 @@ module Main where -import Lib +import Options.Applicative + +newtype Arguments = Arguments { command' :: Command } + +data Command = Run | Test | Build main :: IO () -main = someFunc +main = do + args <- getArguments + run args + +run :: Arguments -> IO () +run args = case command' args of + Run -> putStrLn "Run" + Test -> putStrLn "Test" + Build -> putStrLn "Build" + +getArguments :: IO Arguments +getArguments = execParser + (info + (arguments <**> helper) + (fullDesc <> progDesc "Work with Fortran projects" <> header + "fpm - A Fortran package manager and build system" + ) + ) + +arguments :: Parser Arguments +arguments = subparser + ( command "run" (info runArguments (progDesc "Run the executable")) + <> command "test" (info testArguments (progDesc "Run the tests")) + <> command "build" (info buildArguments (progDesc "Build the executable")) + ) + +runArguments :: Parser Arguments +runArguments = pure $ Arguments Run + +testArguments :: Parser Arguments +testArguments = pure $ Arguments Test + +buildArguments :: Parser Arguments +buildArguments = pure $ Arguments Build diff --git a/package.yaml b/package.yaml index ab3a1d0..2cf73a8 100644 --- a/package.yaml +++ b/package.yaml @@ -21,6 +21,7 @@ description: Please see the README on GitHub at = 4.7 && < 5 +- optparse-applicative library: source-dirs: src diff --git a/stack.yaml b/stack.yaml index 465f104..0094ee9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,7 +17,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-15.1 +resolver: lts-12.26 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/stack.yaml.lock b/stack.yaml.lock index 7e51098..6bee1e8 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -6,7 +6,7 @@ packages: [] snapshots: - completed: - size: 489011 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/1.yaml - sha256: d4ecc42b7125d68e4c3c036a08046ad0cd02ae0d9efbe3af2223a00ff8cc16f3 - original: lts-15.1 + size: 509471 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/26.yaml + sha256: 95f014df58d0679b1c4a2b7bf2b652b61da8d30de5f571abb0d59015ef678646 + original: lts-12.26 -- cgit v1.2.3