Skip to content

Commit

Permalink
Revert "Syncnew (#2)" (#3)
Browse files Browse the repository at this point in the history
This reverts commit b41ff14.
  • Loading branch information
Jasperav authored Jun 8, 2023
1 parent b41ff14 commit ea2431c
Show file tree
Hide file tree
Showing 23 changed files with 171 additions and 800 deletions.
92 changes: 20 additions & 72 deletions .github/workflows/continuous-integration-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
with:
submodules: recursive
- name: install toolchain
uses: dtolnay/rust-toolchain@stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal
components: rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v1
Expand All @@ -22,7 +25,10 @@ jobs:
- name: build b_tests
run: cargo build --package b_tests
- name: rustfmt
run: cargo fmt --all --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
# Disabled because downstream crates don't check this as well
# minversions:
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,29 +63,13 @@ jobs:
# args: --workspace --all-targets
# toolchain: stable

machete:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-machete
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-machete
- name: Check unused dependencies
run: cargo machete

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- stable
- "1.60"
- 1.56.1
os:
- ubuntu-latest
- macos-latest
Expand All @@ -90,55 +80,29 @@ jobs:
with:
submodules: recursive
- name: install toolchain
uses: dtolnay/rust-toolchain@master
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
default: true
profile: minimal
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: install ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v1
- name: test
run: cargo test --workspace --all-targets
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-targets
- name: test no-default-features
run: cargo test -p prost-build -p prost-derive -p prost-types --all-targets --no-default-features
# Run doc tests separately: https://github.com/rust-lang/cargo/issues/6669
- name: test doc
run: cargo test --workspace --doc
- name: test doc
run: cargo test -p prost-build -p prost-derive -p prost-types --doc --no-default-features

kani:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Verify with Kani
uses: model-checking/[email protected]
uses: actions-rs/cargo@v1
with:
enable-propproof: true
args: |
--tests -p prost-types --default-unwind 3 \
--harness "tests::check_timestamp_roundtrip_via_system_time" \
--harness "tests::check_duration_roundtrip_nanos"
# --default-unwind N roughly corresponds to how much effort
# Kani will spend trying to prove correctness of the
# program. Higher the number, more programs can be proven
# correct. However, Kani will require more time and memory. If
# Kani fails with "Failed Checks: unwinding assertion," this
# number may need to be raised for Kani to succeed.
command: test
args: --no-default-features

no-std:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: install toolchain
uses: dtolnay/rust-toolchain@nightly
# no-std:
# runs-on: ubuntu-latest
# steps:
Expand All @@ -156,22 +120,6 @@ jobs:
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
- name: install cargo-no-std-check
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-no-std-check
- name: prost cargo-no-std-check
run: cargo no-std-check --manifest-path Cargo.toml --no-default-features
- name: prost-types cargo-no-std-check
run: cargo no-std-check --manifest-path prost-types/Cargo.toml --no-default-features
# prost-build depends on prost with --no-default-features, but when
# prost-build is built through the workspace, prost typically has default
# features enabled due to vagaries in Cargo workspace feature resolution.
# This additional check ensures that prost-build does not rely on any of
# prost's default features to compile.
- name: prost-build check
run: cargo check --manifest-path prost-build/Cargo.toml
# - uses: Swatinem/rust-cache@v1
# - name: install cargo-no-std-check
# uses: actions-rs/cargo@v1
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "prost"
version = "0.11.8"
version = "0.11.3"
authors = [
"Dan Burkert <[email protected]>",
"Lucio Franco <[email protected]",
Expand All @@ -14,7 +14,7 @@ description = "A Protocol Buffers implementation for the Rust Language."
keywords = ["protobuf", "serialization"]
categories = ["encoding"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.56"

[workspace]
members = [
Expand Down Expand Up @@ -49,11 +49,11 @@ std = []

[dependencies]
bytes = { version = "1", default-features = false }
prost-derive = { version = "0.11.8", path = "prost-derive", optional = true }
prost-derive = { version = "0.11.0", path = "prost-derive", optional = true }
uuid = { version = "1", features = ["v4"] }

[dev-dependencies]
criterion = { version = "0.4", default-features = false }
criterion = "0.3"
env_logger = { version = "0.8", default-features = false }
log = "0.4"
proptest = "1"
Expand Down
69 changes: 0 additions & 69 deletions KANI.md

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ First, add `prost` and its public dependencies to your `Cargo.toml`:

```ignore
[dependencies]
prost = "0.11"
prost = "0.10"
# Only necessary if using Protobuf well-known types:
prost-types = "0.11"
prost-types = "0.10"
```

The recommended way to add `.proto` compilation to a Cargo project is to use the
Expand All @@ -44,7 +44,7 @@ start-to-finish example.

### MSRV

`prost` follows the `tokio-rs` projects MSRV model and supports 1.60. For more
`prost` follows the `tokio-rs` projects MSRV model and supports 1.56+. For more
information on the tokio msrv policy you can check it out [here][tokio msrv]

[tokio msrv]: https://github.com/tokio-rs/tokio/#supported-rust-versions
Expand Down
1 change: 1 addition & 0 deletions conformance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ edition = "2018"
[dependencies]
bytes = "1"
env_logger = { version = "0.8", default-features = false }
log = "0.4"
prost = { path = ".." }
protobuf = { path = "../protobuf" }
tests = { path = "../tests" }
13 changes: 7 additions & 6 deletions prost-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "prost-build"
version = "0.11.8"
version = "0.11.4"
authors = [
"Dan Burkert <[email protected]>",
"Lucio Franco <[email protected]>",
Expand All @@ -12,7 +12,7 @@ documentation = "https://docs.rs/prost-build"
readme = "README.md"
description = "A Protocol Buffers implementation for the Rust Language."
edition = "2021"
rust-version = "1.60"
rust-version = "1.56"

[features]
default = ["format"]
Expand All @@ -27,19 +27,20 @@ itertools = { version = "0.10", default-features = false, features = ["use_alloc
log = "0.4"
multimap = { version = "0.8", default-features = false }
petgraph = { version = "0.6", default-features = false }
prost = { version = "0.11.8", path = "..", default-features = false }
prost-types = { version = "0.11.8", path = "../prost-types", default-features = false }
prost = { version = "0.11.0", path = "..", default-features = false }
prost-types = { version = "0.11.0", path = "../prost-types", default-features = false }
tempfile = "3"
lazy_static = "1.4.0"
regex = { version = "1.5.5", default-features = false, features = ["std", "unicode-bool"] }
which = "4"

prettyplease = { version = "0.2", optional = true }
syn = { version = "2", features = ["full"], optional = true }
prettyplease = { version = "0.1", optional = true }
syn = { version = "1", features = ["full"], optional = true }

# These two must be kept in sync, used for `cleanup-markdown` feature.
pulldown-cmark = { version = "0.9.1", optional = true, default-features = false }
pulldown-cmark-to-cmark = { version = "10.0.1", optional = true }

[dev-dependencies]
env_logger = { version = "0.8", default-features = false }

2 changes: 1 addition & 1 deletion prost-build/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use pulldown_cmark::{CodeBlockKind, Event, Options, Parser, Tag};
use regex::Regex;

/// Comments on a Protobuf item.
#[derive(Debug, Default, Clone)]
#[derive(Debug, Clone)]
pub struct Comments {
/// Leading detached blocks of comments.
pub leading_detached: Vec<Vec<String>>,
Expand Down
Loading

0 comments on commit ea2431c

Please sign in to comment.