casbin / casbin-rs

An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
https://casbin.org
Apache License 2.0
828 stars 67 forks source link

chore: upgrade dependencies #299

Closed greenhandatsjtu closed 2 years ago

casbin-bot commented 2 years ago

@smrpn @hackerchai @PsiACE @GopherJ please review

codecov[bot] commented 2 years ago

Codecov Report

Merging #299 (149d108) into master (e161068) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 149d108 differs from pull request most recent head 5dad44b. Consider uploading reports for the commit 5dad44b to get more accurate results

@@           Coverage Diff           @@
##           master     #299   +/-   ##
=======================================
  Coverage   81.46%   81.46%           
=======================================
  Files          23       23           
  Lines        3463     3463           
=======================================
  Hits         2821     2821           
  Misses        642      642           
Impacted Files Coverage Δ
src/enforcer.rs 87.25% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e161068...5dad44b. Read the comment docs.

github-actions[bot] commented 2 years ago

Benchmark for e161068

Click to view benchmark | Test | PR Benchmark | Master Benchmark | % | |------|--------------|------------------|---| | b_benchmark_rbac_model_large | **11.6±0.07ms** | 11.8±0.08ms | **-1.69%** | | benchmark priority model | 7.0±0.01µs | 7.0±0.01µs | 0.00% | | benchmark_abac_model | **3.9±0.01µs** | 4.0±0.00µs | **-2.50%** | | benchmark_basic_model | 6.4±0.02µs | 6.4±0.01µs | 0.00% | | benchmark_key_match | **20.2±0.04µs** | 20.3±0.04µs | **-0.49%** | | benchmark_raw | **4.0±0.00ns** | 4.1±0.04ns | **-2.44%** | | benchmark_rbac_model | 9.5±0.03µs | 9.5±0.05µs | 0.00% | | benchmark_rbac_model_medium | **1060.0±0.88µs** | 1063.9±3.80µs | **-0.37%** | | benchmark_rbac_model_with_domains | 10.0±0.01µs | 10.0±0.01µs | 0.00% | | benchmark_rbac_with_deny | 12.5±0.04µs | 12.5±0.01µs | 0.00% | | benchmark_rbac_with_resource_roles | 7.5±0.01µs | 7.5±0.01µs | 0.00% | | benchmark_role_manager_large | **4.6±0.00ms** | 4.8±0.02ms | **-4.17%** | | benchmark_role_manager_medium | 402.9±0.57µs | **397.0±0.29µs** | **+1.49%** | | benchmark_role_manager_small | 38.6±0.02µs | **37.2±0.36µs** | **+3.76%** |
github-actions[bot] commented 2 years ago

Benchmark for e161068

Click to view benchmark | Test | PR Benchmark | Master Benchmark | % | |------|--------------|------------------|---| | b_benchmark_rbac_model_large | 15.6±0.53ms | **14.2±0.75ms** | **+9.86%** | | benchmark priority model | 8.1±0.30µs | 8.3±0.49µs | -2.41% | | benchmark_abac_model | **4.6±0.28µs** | 4.9±0.24µs | **-6.12%** | | benchmark_basic_model | 7.5±0.59µs | 7.6±0.44µs | -1.32% | | benchmark_key_match | 27.1±1.11µs | 26.8±1.08µs | +1.12% | | benchmark_raw | 4.5±0.24ns | 4.4±0.24ns | +2.27% | | benchmark_rbac_model | 11.0±0.46µs | 11.0±0.49µs | 0.00% | | benchmark_rbac_model_medium | 1257.7±62.72µs | 1237.8±42.64µs | +1.61% | | benchmark_rbac_model_with_domains | 11.5±0.36µs | 11.6±0.51µs | -0.86% | | benchmark_rbac_with_deny | 14.8±0.98µs | 14.7±0.57µs | +0.68% | | benchmark_rbac_with_resource_roles | 9.2±0.64µs | **8.7±0.35µs** | **+5.75%** | | benchmark_role_manager_large | **6.1±0.29ms** | 7.6±0.33ms | **-19.74%** | | benchmark_role_manager_medium | 466.6±21.36µs | 456.2±21.53µs | +2.28% | | benchmark_role_manager_small | 45.1±2.91µs | 45.7±2.12µs | -1.31% |
greenhandatsjtu commented 2 years ago

Because of a known issue (https://github.com/rust-lang/rust-clippy/issues/9165) of cargo clippy, cargo clippy will fail in nightly Rust (https://github.com/casbin/casbin-rs/runs/7319492415?check_suite_focus=true#step:14:39). image

Seems the only way is to wait cargo clippy fixes this issue.

github-actions[bot] commented 2 years ago

Benchmark for e161068

Click to view benchmark | Test | PR Benchmark | Master Benchmark | % | |------|--------------|------------------|---| | b_benchmark_rbac_model_large | **11.9±0.02ms** | 12.0±0.01ms | **-0.83%** | | benchmark priority model | **7.3±0.01µs** | 7.4±0.01µs | **-1.35%** | | benchmark_abac_model | **4.2±0.01µs** | 4.3±0.01µs | **-2.33%** | | benchmark_basic_model | 6.8±0.09µs | 6.8±0.03µs | 0.00% | | benchmark_key_match | 20.3±0.04µs | **20.1±0.04µs** | **+1.00%** | | benchmark_raw | 3.3±0.00ns | 3.3±0.00ns | 0.00% | | benchmark_rbac_model | **10.1±0.03µs** | 10.2±0.52µs | **-0.98%** | | benchmark_rbac_model_medium | 1131.5±26.33µs | 1130.1±28.34µs | +0.12% | | benchmark_rbac_model_with_domains | 10.4±0.01µs | **10.3±0.02µs** | **+0.97%** | | benchmark_rbac_with_deny | 13.3±0.06µs | 13.3±0.14µs | 0.00% | | benchmark_rbac_with_resource_roles | 7.9±0.01µs | 7.9±0.02µs | 0.00% | | benchmark_role_manager_large | 4.8±0.00ms | 4.8±0.00ms | 0.00% | | benchmark_role_manager_medium | 402.8±0.55µs | 402.3±1.64µs | +0.12% | | benchmark_role_manager_small | 39.4±0.04µs | **39.3±0.03µs** | **+0.25%** |
PsiACE commented 2 years ago

Seems the only way is to wait cargo clippy fixes this issue.

Could we temporarily skip it by using #[allow(....)]

greenhandatsjtu commented 2 years ago

Seems the only way is to wait cargo clippy fixes this issue.

Could we temporarily skip it by using #[allow(....)]

Thanks for your advice, I have tried adding #![allow(clippy::explicit_auto_deref)], but then cargo clippy with stable Rust will fail (https://github.com/casbin/casbin-rs/runs/7335352352?check_suite_focus=true#step:14:40):

error: unknown lint: `clippy::explicit_auto_deref`
 --> src/enforcer.rs:1:10
  |
1 | #![allow(clippy::explicit_auto_deref)]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::explicit_write`
  |
  = note: `-D unknown-lints` implied by `-D warnings