From 05d56f9106d2611b60c3a473fb4e98a39632f162 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Tue, 8 Nov 2022 12:42:08 -0500 Subject: [PATCH 1/9] Remove Travis/Appveyor; add first pass at Jenkins pipeline --- .travis.yml | 74 ------------------------------------- Cargo.lock | 2 +- Jenkinsfile | 39 ++++++++++++++++++++ appveyor.yml | 88 -------------------------------------------- ci/before_deploy.ps1 | 22 ----------- ci/before_deploy.sh | 33 ----------------- ci/install.sh | 27 -------------- ci/script.sh | 24 ------------ 8 files changed, 40 insertions(+), 269 deletions(-) delete mode 100644 .travis.yml create mode 100644 Jenkinsfile delete mode 100644 appveyor.yml delete mode 100644 ci/before_deploy.ps1 delete mode 100644 ci/before_deploy.sh delete mode 100644 ci/install.sh delete mode 100644 ci/script.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index db8b4a6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,74 +0,0 @@ -# Based on the "trust" template v0.1.1 -# https://github.com/japaric/trust/tree/v0.1.1 - -dist: xenial -language: rust -services: docker -sudo: required - -env: - global: - - CRATE_NAME=codedx-client - -matrix: - include: - # Linux - # GNU and MUSL are interchangeable for our purposes, but MUSL is - # purportedly safer and has a smaller memory footprint. This program - # is I/O-bound, so speed isn't really a factor, so we'll use MUSL. - - env: TARGET=x86_64-unknown-linux-musl TARGET_NICE=linux_x86_64 - - env: TARGET=x86_64-unknown-linux-gnu TARGET_NICE=linux_x86_64_dynamic - - # OSX - - env: TARGET=x86_64-apple-darwin TARGET_NICE=mac_x86_64 - os: osx - -before_install: - - set -e - - rustup self update - -install: - - sh ci/install.sh - - source ~/.cargo/env || true - -script: - - bash ci/script.sh - -after_script: set +e - -before_deploy: - - sh ci/before_deploy.sh - -deploy: - # To replace `api_key.secure`, do the following: - # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new - # - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789 - # - Paste the output down here - api_key: - secure: RPi5heDvBOmPFx9zAxI0IngmprsLL5ArErXhEaFh4e+C4CtZbyG9jTJrDta3DWKTLtmGBvbXSxF1UL/cUyBPXVBCS1I1ENenvoB7rshik9UG0m/NMMODaq+x1+vFY1hykuO+HmwQSd4wCDcfRE+xcA8q7dmXQc74EbWNdOUfRWEnY2bhqeVtunnDjR1CTKBHRxlfm66dLdzXXx7t0HjQvoGd6ef3DfT3sCQJ5SX2FCxXTff0Bg6XXacIQb5ikTUgeG2YMUNqpn5tkt3see7lI61kXIQUliEBlHzhNL3GYOAuR24+qCkzi7WTlSj1wtmOBDYtYADpQ0k5ZxYXauT5obPCH0tJJFUjOOHNNSX+zXgYSRZCH3y/kfT/JXZZsOy3YlmhtJAuT9gpgtbGKHvCuhRVzMOEw2At/dpekv4hW4oUTwE6XZChYfdKVBMn2VvwHeccLtB4hotVCy0kODA2HUWGU2KxErQIFhCSHWQooIJG/guDzeQcohhJbm/DTi4nv0zlVYKoq44rIgQODzP4UfVqEkyO6+NuIzPiMrhoZK5DRkHKoBg44co5nWoJoNS6r3j6YyHEwFoOA4loRRBZtfq+JOp2D0q2jAViCbq/iNDd+6gFRoWobsXIAi91ezyRuVfmCtaxfm7eXTdrfklXU87ZPLnz8qFrc1FmIzx6cfs= - file_glob: true - file: $CRATE_NAME-$TRAVIS_TAG-$TARGET_NICE.* - on: - # TODO Here you can pick which targets will generate binary releases - # In this example, there are some targets that are tested using the stable - # and nightly channels. This condition makes sure there is only one release - # for such targets and that's generated using the stable channel - condition: $TRAVIS_RUST_VERSION = stable - tags: true - provider: releases - skip_cleanup: true - -cache: cargo -before_cache: - # Travis can't cache files that are not readable by "others" - - chmod -R a+r $HOME/.cargo - -branches: - only: - # release tags - - /^v\d+\.\d+\.\d+.*$/ - - master - -notifications: - email: - on_success: never diff --git a/Cargo.lock b/Cargo.lock index ffe87a9..2a65bc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,7 +122,7 @@ dependencies = [ [[package]] name = "codedx-client" -version = "0.2.0" +version = "0.3.0" dependencies = [ "clap", "colored", diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..1212a54 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,39 @@ +/* CLI Client build/packaging pipeline. This does a build and generates build artifacts for the + * supported platforms + */ + +pipeline { + options { + buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '30', numToKeepStr: '') // keep builds for 30 days + } + + agent { + label 'rust-crossbuild' + } + + stages { + stage('Check and Build') { + steps { + withCache(name: 'rust-cargo-cache', baseFolder: '$HOME', contents: '.cargo') { + sh "cargo check" + + sh "cargo build --release --target=x86_64-unknown-linux-musl" + sh "cargo build --release --target=x86_64-pc-windows-gnu" + sh "cargo build --release --target=x86_64-apple-darwin" + } + } + + post { + success { + archiveArtifacts artifacts: 'target/*/release/codedx-client, target/*/release/codedx-client.exe', fingerprint: true + } + + failure { + script { + slack.error "codedx-cli-client build failed (<${env.BUILD_URL}|Open>)\n[${scmVars.GIT_BRANCH - 'origin/'}: ${scmVars.GIT_COMMIT}]" + } + } + } + } + } +} diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 86944f8..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,88 +0,0 @@ -# Based on the "trust" template v0.1.1 -# https://github.com/japaric/trust/tree/v0.1.1 - -environment: - global: - RUST_VERSION: stable - - CRATE_NAME: codedx-client - - # TODO These are all the build jobs. Adjust as necessary. Comment out what you - # don't need - matrix: - - TARGET: x86_64-pc-windows-gnu - TARGET_NICE: windows_x86_64 - - # MSVC is the dynamically-linked version, and requires you to have visual studio installed. - # The resulting executable is smaller, but less portable. -# - TARGET: x86_64-pc-windows-msvc -# TARGET_NICE: windows-msvc - - # Testing other channels -# - TARGET: x86_64-pc-windows-gnu -# RUST_VERSION: nightly -# - TARGET: x86_64-pc-windows-msvc -# RUST_VERSION: nightly - -install: - - ps: >- - If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') { - $Env:PATH += ';C:\msys64\mingw64\bin' - } ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') { - $Env:PATH += ';C:\msys64\mingw32\bin' - } - - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION% - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - rustc -Vv - - cargo -V - -# TODO This is the "test phase", tweak it as you see fit -test_script: - # we don't run the "test phase" when doing deploys - - if [%APPVEYOR_REPO_TAG%]==[false] ( - cargo build --target %TARGET% && - cargo build --target %TARGET% --release && - cargo test --target %TARGET% && - cargo test --target %TARGET% --release - ) - -before_deploy: - # TODO Update this to build the artifacts that matter to you - - cargo build --target %TARGET% --release - - ps: ci\before_deploy.ps1 - -deploy: - artifact: /.*\.zip/ - # TODO update `auth_token.secure` - # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new - # - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt - # - Paste the output down here - auth_token: - secure: RJKSB1lgNf0xPtsHX6oEb397QgqPU/J9O+2G1FGcFl5Ox4crmhrnUjZ0X/a1FI1R - description: '' - on: - # TODO Here you can pick which targets will generate binary releases - # In this example, there are some targets that are tested using the stable - # and nightly channels. This condition makes sure there is only one release - # for such targets and that's generated using the stable channel - RUST_VERSION: stable - appveyor_repo_tag: true - provider: GitHub - -cache: - - C:\Users\appveyor\.cargo\registry - - target - -branches: - only: - # Release tags - - /^v\d+\.\d+\.\d+.*$/ - - master - -notifications: - - provider: Email - on_build_success: false - -# Building is done in the test phase, so we disable Appveyor's build phase. -build: false diff --git a/ci/before_deploy.ps1 b/ci/before_deploy.ps1 deleted file mode 100644 index 340efe0..0000000 --- a/ci/before_deploy.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -# This script takes care of packaging the build artifacts that will go in the -# release zipfile - -$SRC_DIR = $PWD.Path -$STAGE = [System.Guid]::NewGuid().ToString() - -Set-Location $ENV:Temp -New-Item -Type Directory -Name $STAGE -Set-Location $STAGE - -$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET_NICE).zip" - -Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\codedx-client.exe" '.\' - -7z a "$ZIP" * - -Push-AppveyorArtifact "$ZIP" - -Remove-Item *.* -Force -Set-Location .. -Remove-Item $STAGE -Set-Location $SRC_DIR diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh deleted file mode 100644 index 813a443..0000000 --- a/ci/before_deploy.sh +++ /dev/null @@ -1,33 +0,0 @@ -# This script takes care of building your crate and packaging it for release - -set -ex - -main() { - local src=$(pwd) \ - stage= - - case $TRAVIS_OS_NAME in - linux) - stage=$(mktemp -d) - ;; - osx) - stage=$(mktemp -d -t tmp) - ;; - esac - - test -f Cargo.lock || cargo generate-lockfile - - # TODO Update this to build the artifacts that matter to you - cross build --target $TARGET --release - - # TODO Update this to package the right artifacts - cp target/$TARGET/release/codedx-client $stage/ - - cd $stage - tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET_NICE.tar.gz * - cd $src - - rm -rf $stage -} - -main diff --git a/ci/install.sh b/ci/install.sh deleted file mode 100644 index 748ad9a..0000000 --- a/ci/install.sh +++ /dev/null @@ -1,27 +0,0 @@ -set -ex - -main() { - local target= - if [ $TRAVIS_OS_NAME = linux ]; then - target=x86_64-unknown-linux-musl - sort=sort - else - target=x86_64-apple-darwin - sort=gsort # for `sort --sort-version`, from brew's coreutils. - fi - - # This fetches latest stable release - local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \ - | cut -d/ -f3 \ - | grep -E '^v[0.1.0-9.]+$' \ - | $sort --version-sort \ - | tail -n1) - curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- \ - --force \ - --git japaric/cross \ - --tag $tag \ - --target $target -} - -main diff --git a/ci/script.sh b/ci/script.sh deleted file mode 100644 index 62d20d4..0000000 --- a/ci/script.sh +++ /dev/null @@ -1,24 +0,0 @@ -# This script takes care of testing your crate - -set -ex - -# TODO This is the "test phase", tweak it as you see fit -main() { - cross build --target $TARGET - cross build --target $TARGET --release - - if [ ! -z $DISABLE_TESTS ]; then - return - fi - - cross test --target $TARGET - cross test --target $TARGET --release - -# cross run --target $TARGET -# cross run --target $TARGET --release -} - -# we don't run the "test phase" when doing deploys -if [ -z $TRAVIS_TAG ]; then - main -fi From f77ee2d336056bb5d47f30948f1d03ed9015963a Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Tue, 8 Nov 2022 14:20:21 -0500 Subject: [PATCH 2/9] Fix scmVars reference --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1212a54..13ea2a9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline { failure { script { - slack.error "codedx-cli-client build failed (<${env.BUILD_URL}|Open>)\n[${scmVars.GIT_BRANCH - 'origin/'}: ${scmVars.GIT_COMMIT}]" + slack.error "codedx-cli-client build failed (<${env.BUILD_URL}|Open>)\n[${env.GIT_BRANCH - 'origin/'}: ${env.GIT_COMMIT}]" } } } From f17bba67526ca55121328aa6038a286ef9c996f9 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Tue, 8 Nov 2022 14:58:32 -0500 Subject: [PATCH 3/9] Update cargo cache --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 13ea2a9..aa305e8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { stages { stage('Check and Build') { steps { - withCache(name: 'rust-cargo-cache', baseFolder: '$HOME', contents: '.cargo') { + withCache(name: 'rust-cargo-cache', baseFolder: '$HOME/.cargo', contents: 'registry') { sh "cargo check" sh "cargo build --release --target=x86_64-unknown-linux-musl" From 85bb686db344dd44b546e2623e070e0b629d68a1 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Wed, 9 Nov 2022 10:38:01 -0500 Subject: [PATCH 4/9] Use vendored feature to cross-build openssl as necessary --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index f6612a7..0c9dfd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ edition = "2021" clap = "2.26.2" colored = "1.5.3" hyper = "0.11" +openssl = { version = "0.10", features = ["vendored"] } serde = "1.0" serde_json = "1.0" serde_derive = "1.0" From 058e340e3227dba35e5554f0807e7a14da576653 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Wed, 9 Nov 2022 11:17:35 -0500 Subject: [PATCH 5/9] Use native-tls-vendored feature for reqwest This will make sure we vendor any dependencies (like openssl) when they're required. Alternatively, we run into issues when using the musl Liux build target, since it wants a cross-compilation pkg-config setup in place, which turns into a whole unnecessary mess. --- Cargo.lock | 782 ++++------------------------------------------------- Cargo.toml | 11 +- 2 files changed, 58 insertions(+), 735 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2a65bc4..870e77e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,16 +28,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - [[package]] name = "base64" version = "0.13.1" @@ -56,22 +46,6 @@ version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "iovec", -] - [[package]] name = "bytes" version = "1.2.1" @@ -84,12 +58,6 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -111,22 +79,13 @@ dependencies = [ "vec_map", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "codedx-client" version = "0.3.0" dependencies = [ "clap", "colored", - "hyper 0.11.27", + "hyper", "nom", "reqwest", "rpassword", @@ -162,61 +121,13 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "encoding_rs" version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -255,37 +166,9 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "percent-encoding 2.2.0", + "percent-encoding", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures-channel" version = "0.3.25" @@ -301,16 +184,6 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" -[[package]] -name = "futures-cpupool" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -dependencies = [ - "futures", - "num_cpus", -] - [[package]] name = "futures-io" version = "0.3.25" @@ -341,7 +214,7 @@ dependencies = [ "memchr 2.5.0", "pin-project-lite", "pin-utils", - "slab 0.4.7", + "slab", ] [[package]] @@ -350,15 +223,15 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ - "bytes 1.2.1", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", "indexmap", - "slab 0.4.7", - "tokio 1.21.2", + "slab", + "tokio", "tokio-util", "tracing", ] @@ -384,7 +257,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.2.1", + "bytes", "fnv", "itoa", ] @@ -395,7 +268,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.2.1", + "bytes", "http", "pin-project-lite", ] @@ -412,40 +285,13 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "hyper" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7" -dependencies = [ - "base64 0.9.3", - "bytes 0.4.12", - "futures", - "futures-cpupool", - "httparse", - "iovec", - "language-tags", - "log 0.4.17", - "mime", - "net2", - "percent-encoding 1.0.1", - "relay", - "time", - "tokio-core", - "tokio-io", - "tokio-proto", - "tokio-service", - "unicase", - "want 0.0.4", -] - [[package]] name = "hyper" version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ - "bytes 1.2.1", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -457,10 +303,10 @@ dependencies = [ "itoa", "pin-project-lite", "socket2", - "tokio 1.21.2", + "tokio", "tower-service", "tracing", - "want 0.3.0", + "want", ] [[package]] @@ -469,10 +315,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.2.1", - "hyper 0.14.23", + "bytes", + "hyper", "native-tls", - "tokio 1.21.2", + "tokio", "tokio-native-tls", ] @@ -502,16 +348,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", + "cfg-if", ] [[package]] @@ -545,12 +382,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" @@ -563,39 +394,15 @@ version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.17", -] - [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "1.0.2" @@ -611,15 +418,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.16" @@ -636,25 +434,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log 0.4.17", - "miow", - "net2", - "slab 0.4.7", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.5" @@ -662,34 +441,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", - "log 0.4.17", - "wasi 0.11.0+wasi-snapshot-preview1", + "log", + "wasi", "windows-sys 0.42.0", ] -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.23", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -698,7 +454,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", - "log 0.4.17", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -708,17 +464,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nom" version = "3.2.1" @@ -751,7 +496,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -776,6 +521,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.24.0+1.1.1s" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.77" @@ -785,42 +539,11 @@ dependencies = [ "autocfg", "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api", - "parking_lot_core", - "rustc_version", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version", - "smallvec 0.6.14", - "winapi 0.3.9", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.2.0" @@ -863,59 +586,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.16" @@ -925,15 +595,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "relay" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" -dependencies = [ - "futures", -] - [[package]] name = "remove_dir_all" version = "0.5.3" @@ -949,29 +610,29 @@ version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" dependencies = [ - "base64 0.13.1", - "bytes 1.2.1", + "base64", + "bytes", "encoding_rs", "futures-core", "futures-util", "h2", "http", "http-body", - "hyper 0.14.23", + "hyper", "hyper-tls", "ipnet", "js-sys", - "log 0.4.17", + "log", "mime", "mime_guess", "native-tls", "once_cell", - "percent-encoding 2.2.0", + "percent-encoding", "pin-project-lite", "serde", "serde_json", "serde_urlencoded", - "tokio 1.21.2", + "tokio", "tokio-native-tls", "tower-service", "url", @@ -992,27 +653,12 @@ dependencies = [ "winapi 0.2.8", ] -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - [[package]] name = "ryu" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "schannel" version = "0.1.20" @@ -1023,18 +669,6 @@ dependencies = [ "windows-sys 0.36.1", ] -[[package]] -name = "scoped-tls" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "security-framework" version = "2.7.0" @@ -1058,21 +692,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.144" @@ -1113,12 +732,6 @@ dependencies = [ "serde", ] -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" - [[package]] name = "slab" version = "0.4.7" @@ -1128,21 +741,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "socket2" version = "0.4.7" @@ -1170,22 +768,16 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "take" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" - [[package]] name = "tempfile" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "remove_dir_all", "winapi 0.3.9", ] @@ -1199,17 +791,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -1225,30 +806,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures", - "mio 0.6.23", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - [[package]] name = "tokio" version = "1.21.2" @@ -1256,88 +813,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" dependencies = [ "autocfg", - "bytes 1.2.1", + "bytes", "libc", "memchr 2.5.0", - "mio 0.8.5", + "mio", "num_cpus", "pin-project-lite", "socket2", "winapi 0.3.9", ] -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures", - "tokio-io", -] - -[[package]] -name = "tokio-core" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b1395334443abca552f63d4f61d0486f12377c2ba8b368e523f89e828cffd4" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "log 0.4.17", - "mio 0.6.23", - "scoped-tls", - "tokio 0.1.22", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-timer", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils", - "futures", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures", - "log 0.4.17", -] - [[package]] name = "tokio-native-tls" version = "0.3.0" @@ -1345,139 +830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", - "tokio 1.21.2", -] - -[[package]] -name = "tokio-proto" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" -dependencies = [ - "futures", - "log 0.3.9", - "net2", - "rand 0.3.23", - "slab 0.3.0", - "smallvec 0.2.1", - "take", - "tokio-core", - "tokio-io", - "tokio-service", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils", - "futures", - "lazy_static", - "log 0.4.17", - "mio 0.6.23", - "num_cpus", - "parking_lot", - "slab 0.4.7", - "tokio-executor", - "tokio-io", - "tokio-sync", -] - -[[package]] -name = "tokio-service" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" -dependencies = [ - "futures", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "mio 0.6.23", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils", - "futures", - "lazy_static", - "log 0.4.17", - "num_cpus", - "slab 0.4.7", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils", - "futures", - "slab 0.4.7", - "tokio-executor", -] - -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures", - "log 0.4.17", - "mio 0.6.23", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "libc", - "log 0.4.17", - "mio 0.6.23", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "tokio", ] [[package]] @@ -1486,11 +839,11 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ - "bytes 1.2.1", + "bytes", "futures-core", "futures-sink", "pin-project-lite", - "tokio 1.21.2", + "tokio", "tracing", ] @@ -1506,7 +859,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", "tracing-core", ] @@ -1520,12 +873,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "try-lock" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" - [[package]] name = "try-lock" version = "0.2.3" @@ -1576,7 +923,7 @@ checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "percent-encoding 2.2.0", + "percent-encoding", ] [[package]] @@ -1597,33 +944,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "want" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1" -dependencies = [ - "futures", - "log 0.4.17", - "try-lock 0.1.0", -] - [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.17", - "try-lock 0.2.3", + "log", + "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1636,7 +966,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -1647,7 +977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "log 0.4.17", + "log", "once_cell", "proc-macro2", "quote", @@ -1661,7 +991,7 @@ version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -1848,13 +1178,3 @@ checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi 0.3.9", ] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] diff --git a/Cargo.toml b/Cargo.toml index 0c9dfd7..9158bfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,13 +7,16 @@ edition = "2021" [dependencies] clap = "2.26.2" colored = "1.5.3" -hyper = "0.11" -openssl = { version = "0.10", features = ["vendored"] } +hyper = "0.14" +rpassword = "2.0.0" # 7.1 serde = "1.0" serde_json = "1.0" serde_derive = "1.0" -reqwest = { version = "0.11", features = ["blocking", "json", "multipart", "native-tls"] } -rpassword = "2.0.0" + +# for reqwest, using native-tls-vendored to make sure that when openssl is used for Linux builds +# that we build our own copy to statically link in rather than depending on what's installed in the +# build VM +reqwest = { version = "0.11", features = ["blocking", "json", "multipart", "native-tls-vendored"] } [dependencies.nom] version = "3.2" From 737a3f4f21a655ef798176f11a95407802bdf97a Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Wed, 9 Nov 2022 11:42:06 -0500 Subject: [PATCH 6/9] Update dependencies as far as we can, remove old cruft --- Cargo.lock | 101 +++++++++++++++++++++++++++++++++++--------------- Cargo.toml | 9 +---- src/config.rs | 3 -- src/main.rs | 1 - src/repl.rs | 6 +-- 5 files changed, 77 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 870e77e..a4435c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "atty" version = "0.2.14" @@ -40,6 +46,18 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitvec" +version = "0.19.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -84,8 +102,6 @@ name = "codedx-client" version = "0.3.0" dependencies = [ "clap", - "colored", - "hyper", "nom", "reqwest", "rpassword", @@ -94,17 +110,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "colored" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" -dependencies = [ - "atty", - "lazy_static", - "winapi 0.3.9", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -169,6 +174,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "futures-channel" version = "0.3.25" @@ -211,7 +222,7 @@ dependencies = [ "futures-core", "futures-io", "futures-task", - "memchr 2.5.0", + "memchr", "pin-project-lite", "pin-utils", "slab", @@ -388,6 +399,19 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lexical-core" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" +dependencies = [ + "arrayvec", + "bitflags", + "cfg-if", + "ryu", + "static_assertions", +] + [[package]] name = "libc" version = "0.2.132" @@ -405,18 +429,9 @@ dependencies = [ [[package]] name = "memchr" -version = "1.0.2" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" -dependencies = [ - "libc", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "mime" @@ -466,11 +481,15 @@ dependencies = [ [[package]] name = "nom" -version = "3.2.1" +version = "6.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" +checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" dependencies = [ - "memchr 1.0.2", + "bitvec", + "funty", + "lexical-core", + "memchr", + "version_check", ] [[package]] @@ -586,6 +605,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + [[package]] name = "redox_syscall" version = "0.2.16" @@ -751,6 +776,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.8.0" @@ -768,6 +799,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.3.0" @@ -815,7 +852,7 @@ dependencies = [ "autocfg", "bytes", "libc", - "memchr 2.5.0", + "memchr", "mio", "num_cpus", "pin-project-lite", @@ -1178,3 +1215,9 @@ checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi 0.3.9", ] + +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" diff --git a/Cargo.toml b/Cargo.toml index 9158bfe..2e23f80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,8 @@ authors = ["Dylan Halperin "] edition = "2021" [dependencies] -clap = "2.26.2" -colored = "1.5.3" -hyper = "0.14" +clap = "2.34" # version 3/4 require changes +nom = "6.2" # nom 7.0+ remove the macro compatibility layer rpassword = "2.0.0" # 7.1 serde = "1.0" serde_json = "1.0" @@ -17,7 +16,3 @@ serde_derive = "1.0" # that we build our own copy to statically link in rather than depending on what's installed in the # build VM reqwest = { version = "0.11", features = ["blocking", "json", "multipart", "native-tls-vendored"] } - -[dependencies.nom] -version = "3.2" -features = ["verbose-errors"] \ No newline at end of file diff --git a/src/config.rs b/src/config.rs index 4fd0997..5276986 100644 --- a/src/config.rs +++ b/src/config.rs @@ -31,9 +31,6 @@ pub struct ClientConfig { pub no_prompt: bool } -// declares the `ApiKey` type which implements the Header trait -header!{ (ApiKey, "API-Key") => [String] } - /// Authentication credentials for connecting to Code Dx. /// Both "basic auth" (username + password) and "api key" are supported. #[derive(Debug)] diff --git a/src/main.rs b/src/main.rs index f9c4f68..80bea34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,6 @@ extern crate rpassword; extern crate serde; #[macro_use] extern crate clap; -#[macro_use] extern crate hyper; #[macro_use] extern crate nom; #[macro_use] extern crate serde_json; #[macro_use] extern crate serde_derive; diff --git a/src/repl.rs b/src/repl.rs index 932d0cc..0408a99 100644 --- a/src/repl.rs +++ b/src/repl.rs @@ -37,8 +37,8 @@ impl FromStr for CmdArgs { type Err = (); fn from_str(s: &str) -> Result { - arg_list(s.as_ref()).to_result() - .map(|v| CmdArgs(v)) + arg_list(s.as_ref()) + .map(|v| CmdArgs(v.1)) .map_err(|_| ()) } } @@ -112,7 +112,7 @@ named!(consecutive_string , named!(one_arg , alt!(dq_string | sq_string | consecutive_string)); -named!(arg_list>, separated_list!(is_a!(" \t"), one_arg)); +named!(arg_list>, separated_list0!(is_a!(" \t"), one_arg)); #[cfg(test)] fn test_parse(s: &str) -> Result, ::nom::Err<&[u8]>> { From 08627f931f121140eb217b77787db3d376abb450 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Wed, 9 Nov 2022 11:48:09 -0500 Subject: [PATCH 7/9] Update rpassword to latest --- Cargo.lock | 43 ++++++++++--------------------------------- Cargo.toml | 2 +- src/config.rs | 2 +- 3 files changed, 12 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a4435c5..dd01436 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -25,7 +25,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -383,16 +383,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -626,7 +616,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -669,13 +659,12 @@ dependencies = [ [[package]] name = "rpassword" -version = "2.1.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37473170aedbe66ffa3ad3726939ba677d83c646ad4fd99e5b4bc38712f45ec" +checksum = "20c9f5d2a0c3e2ea729ab3706d22217177770654c3ef5056b68b69d07332d3f5" dependencies = [ - "kernel32-sys", "libc", - "winapi 0.2.8", + "winapi", ] [[package]] @@ -773,7 +762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -816,7 +805,7 @@ dependencies = [ "libc", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -857,7 +846,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1073,12 +1062,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -1089,12 +1072,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1213,7 +1190,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 2e23f80..3557ea9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] clap = "2.34" # version 3/4 require changes nom = "6.2" # nom 7.0+ remove the macro compatibility layer -rpassword = "2.0.0" # 7.1 +rpassword = "7.0" serde = "1.0" serde_json = "1.0" serde_derive = "1.0" diff --git a/src/config.rs b/src/config.rs index 5276986..4ab1a74 100644 --- a/src/config.rs +++ b/src/config.rs @@ -149,7 +149,7 @@ impl ClientConfig { let foo = username.and_then(|u| { password.or_else(|| { // prompt for the password without actually showing what the user types - rpassword::prompt_password_stdout("password: ").ok() + rpassword::prompt_password("password: ").ok() }).map(|p| { ClientAuth::Basic{ username: u, password: p } }) From ed210c4ccfde37b46ccfa9f8271316879c91e4f0 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Wed, 9 Nov 2022 13:44:04 -0500 Subject: [PATCH 8/9] Add myself as author --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3557ea9..dc7ef5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "codedx-client" version = "0.3.0" -authors = ["Dylan Halperin "] +authors = ["Dylan Halperin ", "Bobby Ferris "] edition = "2021" [dependencies] From 77df2b3cb4db3942ff0490d374b5c86ee5d9df43 Mon Sep 17 00:00:00 2001 From: Robert Ferris Date: Wed, 9 Nov 2022 14:11:46 -0500 Subject: [PATCH 9/9] Add manual status reporting with extra detail --- Jenkinsfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index aa305e8..fc2f168 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,9 +14,21 @@ pipeline { stages { stage('Check and Build') { steps { + script { + github.setBuildStatus('codedx/codedx-cli-client', env.GIT_COMMIT, 'package/jenkins/build.codedx.io', 'pending', 'Preparing to build...') + } + withCache(name: 'rust-cargo-cache', baseFolder: '$HOME/.cargo', contents: 'registry') { + script { + github.setBuildStatus('codedx/codedx-cli-client', env.GIT_COMMIT, 'package/jenkins/build.codedx.io', 'pending', '`cargo check`') + } + sh "cargo check" + script { + github.setBuildStatus('codedx/codedx-cli-client', env.GIT_COMMIT, 'package/jenkins/build.codedx.io', 'pending', '`cargo build`') + } + sh "cargo build --release --target=x86_64-unknown-linux-musl" sh "cargo build --release --target=x86_64-pc-windows-gnu" sh "cargo build --release --target=x86_64-apple-darwin" @@ -25,11 +37,16 @@ pipeline { post { success { + script { + github.setBuildStatus('codedx/codedx-cli-client', env.GIT_COMMIT, 'package/jenkins/build.codedx.io', 'success', '') + } + archiveArtifacts artifacts: 'target/*/release/codedx-client, target/*/release/codedx-client.exe', fingerprint: true } failure { script { + github.setBuildStatus('codedx/codedx-cli-client', env.GIT_COMMIT, 'package/jenkins/build.codedx.io', 'failed', 'Build failed') slack.error "codedx-cli-client build failed (<${env.BUILD_URL}|Open>)\n[${env.GIT_BRANCH - 'origin/'}: ${env.GIT_COMMIT}]" } }