~nickbp/originz

564d9e43f5befae54224ad8688a84d914717cf65 — Nick Parker 3 months ago c0d7d13 main
Actually nevermind, build-deps just seems to be broken now.

```
thread 'main' panicked at 'activated_features for invalid package: features did not find PackageId { name: "criterion", version: "0.3.6", source: "registry `crates-io`" } NormalOrDevOrArtifactTarget(None)', src/tools/cargo/src/cargo/core/resolver/features.rs:318:14
```
2 files changed, 3 insertions(+), 13 deletions(-)

M Cargo.toml
M Dockerfile
M Cargo.toml => Cargo.toml +3 -5
@@ 61,8 61,6 @@ futures-delay-queue = "0.5" # for benchmarks
proptest = "1.0" # for property tests
tempfile = "3" # for benchmarks

# Hack to fix 'cargo build-deps' in Dockerfile:
# Hide this bench section entirely, for whatever reason build-deps wants to see server.rs.
[[bench]] # build-deps: skip
name = "server" # build-deps: skip
harness = false # build-deps: skip
[[bench]]
name = "server"
harness = false

M Dockerfile => Dockerfile +0 -8
@@ 12,14 12,6 @@ RUN apt-get update \
  && cd / \
  && cargo new --bin originz

# Build dependencies on their own as separate step to improve cached builds
# (only copy Cargo.* to avoid source changes breaking this cache)
COPY Cargo.toml Cargo.lock /originz
# Hack: fix for "can't find `server` bench at `benches/server.rs` [...]"
RUN cd /originz \
  && sed -i 's/.*build-deps: skip.*//g' Cargo.toml \
  && cargo build-deps --release

COPY . /originz
RUN cd /originz && cargo build --release