From 086c797d04ec113bd772bd8ff5d8801b34f07f67 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Thu, 20 Jul 2023 22:49:13 +0200 Subject: [PATCH] Pin crate versions --- .github/dependabot.yml | 16 +++ Dockerfile | 5 +- bin/generate-registry.sh | 23 ---- local-registry/Cargo.toml | 233 +++++++++++++++++++++++++++++++- local-registry/supported_crates | 232 ------------------------------- 5 files changed, 249 insertions(+), 260 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100755 bin/generate-registry.sh delete mode 100644 local-registry/supported_crates diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..177304c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 + +updates: + - package-ecosystem: 'cargo' + directory: '/local-registry' + schedule: + interval: 'weekly' + groups: + - all: + patterns: + - "*" + versioning-strategy: 'increase' + labels: + - 'x:rep/tiny' diff --git a/Dockerfile b/Dockerfile index c783349..08ef844 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,6 @@ RUN rm src/lib.rs COPY src/* src/ # build the executable RUN cargo build --release -COPY bin/generate-registry.sh ${wd}/bin/ # download jq RUN curl -L -o /usr/local/bin/jq "${JQ_URL}" \ && chmod +x /usr/local/bin/jq @@ -31,7 +30,7 @@ RUN cargo install cargo-local-registry # download popular crates to local registry WORKDIR /local-registry COPY local-registry/* ./ -RUN ${wd}/bin/generate-registry.sh +RUN cargo generate-lockfile && cargo local-registry --sync Cargo.lock . # As of Dec 2019, we need to use the nightly toolchain to get JSON test output # tracking issue: https://github.com/rust-lang/rust/issues/49359 @@ -103,6 +102,4 @@ RUN echo '[source.crates-io]\n\ local-registry = "/opt/test-runner/local-registry/"\n' >> $CARGO_HOME/config.toml # set entrypoint COPY bin/run.sh bin -COPY --from=build /usr/local/cargo/bin/cargo-local-registry /usr/local/cargo/bin/ -COPY bin/generate-registry.sh bin ENTRYPOINT ["bin/run.sh"] diff --git a/bin/generate-registry.sh b/bin/generate-registry.sh deleted file mode 100755 index 7c496d0..0000000 --- a/bin/generate-registry.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -export RUSTUP_HOME=/usr/local/rustup -export CARGO_HOME=/usr/local/cargo -export PATH=/usr/local/cargo/bin:$PATH - -cd /local-registry || cd /opt/test-runner/local-registry - -perl -i -p0e 's/(\[dependencies\]\n).*/$1/se' Cargo.toml - -# Uncomment after this file is added to exercism/rust (and remove file in current repo) -#curl -O -J https://raw.githubusercontent.com/exercism/rust/main/supported_crates - -# this can't be parallelized, there's a lock on package cache when using cargo search -append_dep() { - echo "retrieving info for $1..." - cargo search "$1" | head -n 1 >> Cargo.toml -} -while IFS= read -r crate - do append_dep "$crate" -done < supported_crates - -cargo generate-lockfile && cargo local-registry --sync Cargo.lock . diff --git a/local-registry/Cargo.toml b/local-registry/Cargo.toml index bf84061..4cbf4a8 100644 --- a/local-registry/Cargo.toml +++ b/local-registry/Cargo.toml @@ -1,9 +1,240 @@ [package] name = "dummy_package" -version="0.1.0" +version = "0.1.0" edition = "2021" [lib] path = "dummy.rs" [dependencies] +alloc_counter = "0.0.4" +anyhow = "1.0.72" +array_tool = "1.0.3" +arrayvec = "0.7.4" +arr_macro = "0.2.1" +ascii = "1.1.0" +assert_float_eq = "1.1.3" +as-slice = "0.2.1" +async-channel = "1.9.0" +async-std = "1.12.0" +bencher = "0.1.5" +bigdecimal = "0.4.1" +bigint = "4.4.3" +bimap = "0.6.3" +binary-heap-plus = "0.5.0" +binomial-iter = "0.1.0" +bitflags = "2.3.3" +bit-set = "0.5.3" +bit-vec = "0.6.3" +bitvec = "1.0.1" +boolinator = "2.4.0" +bstr = "1.6.0" +bytecount = "0.6.3" +cached = "0.44.0" +case = "1.0.0" +case_insensitive_hashmap = "1.0.0" +caseless = "0.2.1" +cast = "0.3.0" +change-case = "0.2.0" +char-iter = "0.1.0" +char_stream = "0.1.8" +chashmap = "2.2.2" +chomp = "0.3.1" +chrono = "0.4.26" +clap = "4.3.17" +compare = "0.1.0" +const_fn_assert = "0.1.3+deprecated" +conv = "0.3.3" +convert_case = "0.6.0" +counted-array = "0.1.2" +counter = "0.5.7" +cow-utils = "0.1.2" +cranelift = "0.98.0" +cranelift-module = "0.98.0" +cranelift-simplejit = "0.68.0" +criterion = "0.5.1" +crossbeam = "0.8.2" +crossbeam-channel = "0.5.8" +crossbeam-utils = "0.8.16" +csv = "1.2.2" +custom_derive = "0.1.7" +dashmap = "5.5.0" +defaultmap = "0.5.0" +derivative = "2.2.0" +derive_more = "0.99.17" +deunicode = "1.3.3" +dia-time = "7.0.0" +digits_iterator = "0.1.0" +divisors = "0.2.1" +divrem = "1.0.0" +duplicate = "1.0.0" +easybench = "1.1.1" +either = "1.8.1" +encode_unicode = "1.0.0" +enum_derive = "0.1.7" +enumflags2 = "0.7.7" +enum-iterator = "1.4.1" +enum-primitive-derive = "0.2.2" +enumset = "1.1.2" +enum-utils = "0.1.2" +eval = "0.4.3" +evalexpr = "11.0.0" +factor = "0.4.0" +factorial = "0.3.0" +failure = "0.1.8" +failure_derive = "0.1.8" +fancy-regex = "0.11.0" +fasteval = "0.2.4" +fixedbitset = "0.4.2" +flagset = "0.4.3" +flame = "0.2.2" +flamer = "0.5.0" +fluent = "0.16.0" +fnv = "1.0.7" +foreach = "0.3.0" +free-ranges = "1.0.7" +frunk = "0.4.2" +futures-core = "0.3.28" +gcd = "2.3.0" +genawaiter = "0.99.1" +generational-arena = "0.2.9" +grapheme = "0.0.0" +hashbag = "0.1.11" +hashbrown = "0.14.0" +hashers = "1.0.1" +hexlit = "0.5.5" +humantime = "2.1.0" +if_chain = "1.0.2" +im = "15.1.0" +image = "0.24.6" +imageproc = "0.23.0" +incremental-topo = "0.2.1" +indexmap = "2.0.0" +indicatif = "0.17.5" +indoc = "2.0.3" +inflections = "1.1.1" +Inflector = "0.11.4" +integer-sqrt = "0.1.5" +int-enum = "0.5.0" +itertools = "0.11.0" +itoa = "1.0.9" +kmp = "0.1.1" +lalrpop-util = "0.20.0" +lazysort = "0.2.1" +lazy_static = "1.4.0" +left-pad = "1.0.1" +lexical-sort = "0.3.1" +libm = "0.2.7" +libmath = "0.2.1" +linked-hash-map = "0.5.6" +linked_hash_set = "0.1.4" +log = "0.4.19" +luhn = "1.0.1" +macro-attr = "0.2.0" +maplit = "1.0.2" +memoize = "0.4.0" +modexp = "0.2.2" +mod_exp = "1.0.1" +modinverse = "0.1.1" +modulo = "0.1.2" +multimap = "0.9.0" +multiset = "0.0.5" +mustache = "0.9.0" +ndarray = "0.15.6" +nom = "7.1.3" +num = "0.4.1" +num-bigint = "0.4.3" +num_cpus = "1.16.0" +num-derive = "0.4.0" +num-digitize = "0.4.2" +num_enum = "0.6.1" +num-format = "0.4.4" +num-integer = "0.1.45" +numtoa = "0.2.4" +num-traits = "0.2.15" +once_cell = "1.18.0" +onig = "6.4.0" +ordered-float = "3.7.0" +out = "8.0.0" +pathfinding = "4.3.0" +pcre = "0.2.3" +peg = "0.8.1" +permutator = "0.4.3" +permutohedron = "0.2.4" +pest = "2.7.1" +pest_derive = "2.7.1" +petgraph = "0.6.3" +phf = "0.11.2" +phf_macros = "0.11.2" +pprof = "0.12.0" +pretty_assertions = "1.4.0" +primal = "0.3.2" +primes = "0.3.0" +prime_tools = "0.3.4" +proptest = "1.2.0" +queues = "1.1.0" +quickcheck = "1.0.3" +quickcheck_macros = "1.0.0" +ramp = "0.7.0" +rand = "0.8.5" +rand_chacha = "0.3.1" +rayon = "1.7.0" +readonly = "0.2.10" +recur-fn = "2.2.0" +reduce = "0.1.5+deprecated" +regex = "1.9.1" +reikna = "0.12.3" +rs_poker = "3.0.0-alpha.5" +rstest = "0.18.1" +rstest_reuse = "0.6.0" +rug = "1.19.2" +rusqlite = "0.29.0" +rustc-hash = "1.1.0" +rustversion = "1.0.14" +say-number = "1.0.0" +scan_fmt = "0.2.6" +scoped-pool = "1.0.0" +scoped_threadpool = "0.1.9" +serde = "1.0.173" +serde_derive = "1.0.173" +serial_test = "2.0.0" +simplelog = "0.12.1" +simple_parallel = "0.3.0" +sliding_windows = "3.0.0" +slow_primes = "0.1.14" +sparse-bitfield = "0.11.0" +spinning_top = "0.2.5" +static_assertions = "1.1.0" +strfmt = "0.2.4" +stringreader = "0.1.1" +stringsort = "2.0.0" +structopt = "0.3.26" +strum = "0.25.0" +strum_macros = "0.25.1" +subslice = "0.2.3" +test-case = "3.1.0" +thiserror = "1.0.43" +threadpool = "1.8.1" +time = "0.3.23" +tinyset = "0.4.15" +tramp = "0.3.0" +transpose = "0.2.2" +try_opt = "0.2.0" +unicase = "2.6.0" +unic-char-range = "0.9.0" +unic-langid = "0.9.1" +unic-normal = "0.9.0" +unicode-case-mapping = "0.5.0" +unicode-normalization = "0.1.22" +unicode_reader = "1.0.2" +unicode-reverse = "1.0.8" +unicode-segmentation = "1.10.1" +unic-segment = "0.9.0" +unidecode = "0.3.0" +unzip-n = "0.1.2" +uuid = "1.4.1" +voca_rs = "1.15.2" +watch = "0.2.3" +workerpool = "1.2.0" +xvii = "0.4.1" +z3 = "0.11.1" diff --git a/local-registry/supported_crates b/local-registry/supported_crates deleted file mode 100644 index bcd83ec..0000000 --- a/local-registry/supported_crates +++ /dev/null @@ -1,232 +0,0 @@ -unicode-segmentation -chrono -itertools -rand -regex -lazy_static -rayon -time -num -unicode-reverse -maplit -crossbeam -num-traits -primes -num-bigint -modulo -criterion -num-integer -crossbeam-utils -bit-vec -strum -strum_macros -primal -once_cell -failure -counter -permutator -rstest -crossbeam-channel -bitflags -permutohedron -num-derive -ndarray -anyhow -nom -threadpool -cached -unicase -phf -libmath -unicode-normalization -rstest_reuse -petgraph -im -hexlit -enum-iterator -boolinator -uuid -num_enum -duplicate -divrem -pest -modinverse -dashmap -bit-set -bimap -voca_rs -unic-segment -thiserror -multiset -kmp -gcd -fnv -derivative -ascii -unicode_reader -unic-char-range -structopt -scan_fmt -pretty_assertions -pest_derive -multimap -try_opt -integer-sqrt -int-enum -indexmap -hashers -grapheme -factorial -eval -derive_more -counted-array -case -bitvec -arrayvec -Inflector -watch -stringsort -serde -rusqlite -reikna -modexp -mod_exp -lazysort -evalexpr -enumflags2 -enum_derive -custom_derive -char_stream -bytecount -bencher -unzip-n -unic-normal -transpose -test-case -subslice -strfmt -slow_primes -serde_derive -say-number -rustversion -rs_poker -recur-fn -readonly -rand_chacha -ramp -quickcheck_macros -quickcheck -proptest -prime_tools -peg -pcre -ordered-float -onig -num_cpus -luhn -linked_hash_set -linked-hash-map -libm -inflections -indicatif -imageproc -image -if_chain -hashbag -generational-arena -frunk -factor -enum-primitive-derive -either -digits_iterator -csv -conv -compare -char-iter -caseless -binomial-iter -bigint -bigdecimal -async-std -async-channel -assert_float_eq -array_tool -z3 -xvii -workerpool -unidecode -unicode-case-mapping -unic-langid -tramp -tinyset -stringreader -static_assertions -spinning_top -sparse-bitfield -sliding_windows -simplelog -simple_parallel -serial_test -scoped_threadpool -scoped-pool -rustc-hash -rug -reduce -queues -pprof -phf_macros -pathfinding -out -numtoa -num-format -num-digitize -mustache -memoize -macro-attr -log -lexical-sort -left-pad -lalrpop-util -itoa -indoc -incremental-topo -humantime -hashbrown -genawaiter -futures-core -free-ranges -foreach -fluent -flamer -flame -flagset -fixedbitset -fasteval -fancy-regex -failure_derive -enumset -enum-utils -encode_unicode -easybench -divisors -dia-time -deunicode -defaultmap -cranelift-simplejit -cranelift-module -cranelift -cow-utils -convert_case -const_fn_assert -clap -chomp -chashmap -change-case -cast -case_insensitive_hashmap -bstr -binary-heap-plus -as-slice -arr_macro -alloc_counter -ahash \ No newline at end of file