summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid LeGare <legare@google.com>2022-06-28 17:31:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-28 17:31:16 +0000
commit10fca123376f41c1d27b59f4c1ba8423a8802a39 (patch)
treef62d3fea0e8d2d7e042bd720862c789ff7c63c75
parent8a5a37cf7e3b370c51aecda8f6c97f727ef8c2ff (diff)
parente9468031ff607646f94c7a6bba57be28b7704aef (diff)
downloadcexpr-10fca123376f41c1d27b59f4c1ba8423a8802a39.tar.gz
Upgrade rust/crates/cexpr to 0.6.0 am: 417a5cbdb1 am: 6e902fa055 am: 3f23e9d263 am: 614b84d7bc am: e9468031ff
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cexpr/+/2137713 Change-Id: Ie59ca898dde2ed577bdf39a235cb97691d811e97 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--.github/workflows/ci.yml31
-rw-r--r--.travis.yml18
-rw-r--r--Android.bp6
-rw-r--r--Cargo.toml11
-rw-r--r--Cargo.toml.orig4
-rw-r--r--METADATA8
-rw-r--r--patches/nom7.patch84
8 files changed, 48 insertions, 116 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 8481d95..72d29e1 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "6a43efb32cf14b8dc4cd294429d3de259d37e279"
+ "sha1": "c7ccdfbc37b508cfda1171ab4f89afaeb72e82f3"
}
}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..8af3b70
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,31 @@
+name: CI
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+
+jobs:
+ build_and_test:
+ name: Build and Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install LLVM and Clang
+ uses: KyleMayes/install-llvm-action@v1
+ with:
+ version: "11.0"
+ directory: ${{ runner.temp }}/llvm-11.0
+
+ - uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+
+ - uses: actions-rs/cargo@v1
+ with:
+ command: test
+ args: --verbose --all
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 3c39e22..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-branches:
- only:
- # This is where pull requests from "bors r+" are built.
- - staging
- # This is where pull requests from "bors try" are built.
- - trying
- # Not really necessary, just to get a green badge on “master”
- - master
-language: rust
-dist: xenial
-addons:
- apt:
- packages:
- - libclang-dev
-env:
- - RUST_BACKTRACE=1 LLVM_CONFIG_PATH=llvm-3.8-config
-script:
- - cargo test --verbose --all
diff --git a/Android.bp b/Android.bp
index e0534ba..02c5169 100644
--- a/Android.bp
+++ b/Android.bp
@@ -42,10 +42,14 @@ rust_library {
host_supported: true,
crate_name: "cexpr",
cargo_env_compat: true,
- cargo_pkg_version: "0.5.0",
+ cargo_pkg_version: "0.6.0",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
"libnom",
],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
}
diff --git a/Cargo.toml b/Cargo.toml
index a3067d0..4956001 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,17 +3,16 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
name = "cexpr"
-version = "0.5.0"
+version = "0.6.0"
authors = ["Jethro Beekman <jethro@jbeekman.nl>"]
description = "A C expression parser and evaluator"
documentation = "https://docs.rs/cexpr/"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index acbe572..6de1e89 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "cexpr"
-version = "0.5.0"
+version = "0.6.0"
edition = "2018"
authors = ["Jethro Beekman <jethro@jbeekman.nl>"]
license = "Apache-2.0/MIT"
@@ -13,7 +13,7 @@ keywords = ["C","expression","parser"]
travis-ci = { repository = "jethrogb/rust-cexpr" }
[dependencies]
-nom = { version = "6", default-features = false, features = ["std"] }
+nom = { version = "7", default-features = false, features = ["std"] }
[dev-dependencies]
clang-sys = ">= 0.13.0, < 0.29.0"
diff --git a/METADATA b/METADATA
index ea007fa..e9c66ec 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/cexpr/cexpr-0.5.0.crate"
+ value: "https://static.crates.io/crates/cexpr/cexpr-0.6.0.crate"
}
- version: "0.5.0"
+ version: "0.6.0"
license_type: NOTICE
last_upgrade_date {
- year: 2021
+ year: 2022
month: 6
- day: 21
+ day: 27
}
}
diff --git a/patches/nom7.patch b/patches/nom7.patch
deleted file mode 100644
index 5ba703d..0000000
--- a/patches/nom7.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/Cargo.toml b/Cargo.toml
-index 8f6dcc2..a3067d0 100644
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -21,7 +21,7 @@ keywords = ["C", "expression", "parser"]
- license = "Apache-2.0/MIT"
- repository = "https://github.com/jethrogb/rust-cexpr"
- [dependencies.nom]
--version = "6"
-+version = "7"
- features = ["std"]
- default-features = false
- [dev-dependencies.clang-sys]
-diff --git a/src/expr.rs b/src/expr.rs
-index 5dce3c7..7f7e458 100644
---- a/src/expr.rs
-+++ b/src/expr.rs
-@@ -308,7 +308,7 @@ impl<'a> PRef<'a> {
- pair(complete(one_of_punctuation(&["*", "/", "%"][..])), |i| {
- self.unary(i)
- }),
-- acc,
-+ move || acc.clone(),
- |mut acc, (op, val): (&[u8], EvalResult)| {
- match op[0] as char {
- '*' => acc *= &val,
-@@ -327,7 +327,7 @@ impl<'a> PRef<'a> {
- pair(complete(one_of_punctuation(&["+", "-"][..])), |i| {
- self.mul_div_rem(i)
- }),
-- acc,
-+ move || acc.clone(),
- |mut acc, (op, val): (&[u8], EvalResult)| {
- match op[0] as char {
- '+' => acc += &val,
-@@ -345,7 +345,7 @@ impl<'a> PRef<'a> {
- pair(complete(one_of_punctuation(&["<<", ">>"][..])), |i| {
- self.add_sub(i)
- }),
-- acc,
-+ move || acc.clone(),
- |mut acc, (op, val): (&[u8], EvalResult)| {
- match op {
- b"<<" => acc <<= &val,
-@@ -361,7 +361,7 @@ impl<'a> PRef<'a> {
- let (input, acc) = self.shl_shr(input)?;
- numeric(fold_many0(
- preceded(complete(p("&")), |i| self.shl_shr(i)),
-- acc,
-+ move || acc.clone(),
- |mut acc, val: EvalResult| {
- acc &= &val;
- acc
-@@ -373,7 +373,7 @@ impl<'a> PRef<'a> {
- let (input, acc) = self.and(input)?;
- numeric(fold_many0(
- preceded(complete(p("^")), |i| self.and(i)),
-- acc,
-+ move || acc.clone(),
- |mut acc, val: EvalResult| {
- acc ^= &val;
- acc
-@@ -385,7 +385,7 @@ impl<'a> PRef<'a> {
- let (input, acc) = self.xor(input)?;
- numeric(fold_many0(
- preceded(complete(p("|")), |i| self.xor(i)),
-- acc,
-+ move || acc.clone(),
- |mut acc, val: EvalResult| {
- acc |= &val;
- acc
-diff --git a/src/literal.rs b/src/literal.rs
-index b74699f..68e85c7 100644
---- a/src/literal.rs
-+++ b/src/literal.rs
-@@ -224,7 +224,7 @@ fn c_string(i: &[u8]) -> nom::IResult<&[u8], Vec<u8>> {
- map(escaped_char, |c: CChar| c.into()),
- map(is_not([b'\\', b'"']), |c: &[u8]| c.into()),
- )),
-- Vec::new(),
-+ Vec::new,
- |mut v: Vec<u8>, res: Vec<u8>| {
- v.extend_from_slice(&res);
- v