-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
6,957 additions
and
1,655 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
cargo clippy --all-targets --all-features -p bson -- -D warnings | ||
|
||
cd serde-tests && cargo clippy --all-targets --all-features -p serde-tests -- -D warnings | ||
# Pin clippy to the latest version. This should be updated when new versions of Rust are released. | ||
CLIPPY_VERSION=1.65.0 | ||
|
||
rustup install $CLIPPY_VERSION | ||
|
||
cargo +$CLIPPY_VERSION clippy --all-targets --all-features -p bson -- -D warnings | ||
|
||
cd serde-tests | ||
cargo +$CLIPPY_VERSION clippy --all-targets --all-features -p serde-tests -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
cargo +nightly rustdoc -p bson --all-features -- --cfg docsrs -D warnings | ||
|
||
cargo +nightly rustdoc -p bson --all-features -- --cfg docsrs -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
rustup update $RUST_VERSION | ||
|
||
# pin all dependencies when checking msrv compilation | ||
if [ "$MSRV" = "true" ]; then | ||
cp .evergreen/Cargo.lock.msrv Cargo.lock | ||
fi | ||
|
||
rustup run $RUST_VERSION cargo build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
rm -rf ~/.rustup | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
|
||
cargo install cargo-fuzz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
|
||
cd fuzz | ||
|
||
# each runs for a minute | ||
cargo +nightly fuzz run deserialize -- -rss_limit_mb=4096 -max_total_time=60 | ||
cargo +nightly fuzz run raw_deserialize -- -rss_limit_mb=4096 -max_total_time=60 | ||
cargo +nightly fuzz run iterate -- -rss_limit_mb=4096 -max_total_time=60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
|
||
RUST_BACKTRACE=1 cargo test | ||
RUST_BACKTRACE=1 cargo test --features chrono-0_4,uuid-0_8 | ||
RUST_BACKTRACE=1 cargo test --all-features | ||
|
||
cd serde-tests | ||
RUST_BACKTRACE=1 cargo test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
|
||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
cd $(dirname $0)/../wasm-test | ||
wasm-pack test --node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Make sure you have read CONTRIBUTING.md completely before you file a new | ||
issue! | ||
--> | ||
|
||
## Versions/Environment | ||
1. What version of Rust are you using? | ||
2. What operating system are you using? | ||
3. What versions of the driver and its dependencies are you using? (Run | ||
`cargo pkgid mongodb` & `cargo pkgid bson`) | ||
4. What version of MongoDB are you using? (Check with the MongoDB shell using `db.version()`) | ||
5. What is your MongoDB topology (standalone, replica set, sharded cluster, serverless)? | ||
|
||
|
||
|
||
## Describe the bug | ||
A clear and concise description of what the bug is. | ||
|
||
**BE SPECIFIC**: | ||
* What is the _expected_ behavior and what is _actually_ happening? | ||
* Do you have any particular output that demonstrates this problem? | ||
* Do you have any ideas on _why_ this may be happening that could give us a | ||
clue in the right direction? | ||
* Did this issue arise out of nowhere, or after an update (of the driver, | ||
server, and/or Rust)? | ||
* Are there multiple ways of triggering this bug (perhaps more than one | ||
function produce a crash)? | ||
* If you know how to reproduce this bug, please include a code snippet here: | ||
``` | ||
``` | ||
|
||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. First, do this. | ||
2. Then do this. | ||
3. After doing that, do this. | ||
4. And then, finally, do this. | ||
5. Bug occurs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
|
||
name: 'Close stale issues' | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
permissions: | ||
issues: write | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v4 | ||
with: | ||
stale-issue-message: 'There has not been any recent activity on this ticket, so we are marking it as stale. If we do not hear anything further from you, this issue will be automatically closed in one week.' | ||
days-before-issue-stale: 7 | ||
days-before-pr-stale: -1 | ||
days-before-close: 7 | ||
close-issue-message: 'There has not been any recent activity on this ticket, so we are closing it. Thanks for reaching out and please feel free to file a new issue if you have further questions.' | ||
only-issue-labels: 'waiting-for-reporter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
|
||
name: Issue assignment | ||
on: | ||
issues: | ||
types: [opened] | ||
jobs: | ||
auto-assign: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Auto-assign issue' | ||
uses: pozil/[email protected] | ||
with: | ||
assignees: patrickfreed,abr-egn,isabelatkinson,kmahar | ||
numOfAssignee: 1 | ||
add-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: initial labeling | ||
uses: andymckay/labeler@master | ||
with: | ||
add-labels: "triage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
|
||
name: Remove Labels | ||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
jobs: | ||
remove-labels: | ||
if: ${{ github.actor != 'Tom Selander' && github.actor != 'patrickfreed' | ||
&& github.actor != 'abr-egn' && github.actor != 'isabelatkinson'}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: initial labeling | ||
uses: andymckay/labeler@master | ||
with: | ||
remove-labels: "waiting-for-reporter, Stale" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
[package] | ||
name = "bson" | ||
version = "2.0.0" | ||
version = "2.6.0" | ||
authors = [ | ||
"Y. T. Chung <[email protected]>", | ||
"Kevin Yeh <[email protected]>", | ||
"Saghm Rossi <[email protected]>", | ||
"Patrick Freed <[email protected]>", | ||
"Isabel Atkinson <[email protected]>", | ||
"Abraham Egnor <[email protected]>", | ||
] | ||
description = "Encoding and decoding support for BSON in Rust" | ||
license = "MIT" | ||
|
@@ -33,9 +34,15 @@ exclude = [ | |
[features] | ||
default = [] | ||
# if enabled, include API for interfacing with chrono 0.4 | ||
chrono-0_4 = [] | ||
chrono-0_4 = ["chrono"] | ||
# if enabled, include API for interfacing with uuid 0.8 | ||
uuid-0_8 = [] | ||
# This is commented out because Cargo implicitly adds this feature since | ||
# uuid-0_8 is also an optional dependency. | ||
# uuid-0_8 = [] | ||
# if enabled, include API for interfacing with uuid 1.x | ||
uuid-1 = [] | ||
# if enabled, include API for interfacing with time 0.3 | ||
time-0_3 = [] | ||
# if enabled, include serde_with interop. | ||
# should be used in conjunction with chrono-0_4 or uuid-0_8. | ||
# it's commented out here because Cargo implicitly adds a feature flag for | ||
|
@@ -47,17 +54,23 @@ name = "bson" | |
|
||
[dependencies] | ||
ahash = "0.7.2" | ||
chrono = { version = "0.4.15", features = ["std"], default-features = false } | ||
chrono = { version = "0.4.15", features = ["std"], default-features = false, optional = true } | ||
rand = "0.8" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = { version = "1.0", features = ["preserve_order"] } | ||
indexmap = "1.6.2" | ||
hex = "0.4.2" | ||
base64 = "0.13.0" | ||
lazy_static = "1.4.0" | ||
uuid = { version = "0.8.1", features = ["serde", "v4"] } | ||
uuid-0_8 = { package = "uuid", version = "0.8.1", features = ["serde", "v4"], optional = true } | ||
uuid = { version = "1.1.2", features = ["serde", "v4"] } | ||
serde_bytes = "0.11.5" | ||
serde_with = { version = "1", optional = true } | ||
time = { version = "0.3.9", features = ["formatting", "parsing", "macros", "large-dates"] } | ||
bitvec = "1.0.1" | ||
|
||
[target.'cfg(target_arch = "wasm32")'.dependencies] | ||
js-sys = "0.3" | ||
|
||
[dev-dependencies] | ||
assert_matches = "1.2" | ||
|
@@ -69,4 +82,4 @@ chrono = { version = "0.4", features = ["serde", "clock", "std"], default-featur | |
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
rustdoc-args = ["--cfg", "docsrs"] |
Oops, something went wrong.