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

fix: Initial migration from Rust 2018 to Rust 2021 #291

Closed SiddheshKanawade closed 2 years ago

SiddheshKanawade commented 2 years ago

Steps followed to migrate from rust 2018 to 2021:

  1. cargo update
  2. cargo fix –-edition
  3. updated the cargo.toml --edition
  4. ran cargo build and cargo test to check whether changes are implemented and code is running. The warnings were resolved after the update in the main repository which included the change of syntax of def_package! compatible with latest rhai edition
  5. Updated the Cargo.toml file dependencies to their latest version
  6. cargo +nightly udeps to check the unused dependencies, found none
  7. cargo outdated to check outdated dependencies, found some, updated via cargo update
  8. cargo build and cargo test to verify the changes are implemented successfully
casbin-bot commented 2 years ago

@smrpn @hackerchai @PsiACE @GopherJ please review

SiddheshKanawade commented 2 years ago

@PsiACE I have created a new PR since in last one I was not able to sign CLA, now all the initial checks are done, kindly review the PR.

codecov[bot] commented 2 years ago

Codecov Report

Merging #291 (3d26998) into master (9320add) will decrease coverage by 0.00%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
- Coverage   81.03%   81.03%   -0.01%     
==========================================
  Files          23       23              
  Lines        3338     3337       -1     
==========================================
- Hits         2705     2704       -1     
  Misses        633      633              
Impacted Files Coverage Δ
src/rbac/default_role_manager.rs 98.12% <0.00%> (-0.01%) :arrow_down:

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 9320add...3d26998. Read the comment docs.

SiddheshKanawade commented 2 years ago

@PsiACE please let me know what else I need to do to complete the migration from Rust 2018 to Rust 2021

PsiACE commented 2 years ago

@PsiACE please let me know what else I need to do to complete the migration from Rust 2018 to Rust 2021

For casbin-rs, that's enough. Other projects may need to fix a lot of clippy lints

SiddheshKanawade commented 2 years ago

@PsiACE please let me know what else I need to do to complete the migration from Rust 2018 to Rust 2021

For casbin-rs, that's enough. Other projects may need to fix a lot of clippy lints

@PsiACE I was trying to understand more about the rust project this year for GSOC '22, it had Embrace Rust 2021 edition as one of its key point, so what else I have to do in completing the first task in the list?

Screen Shot 2022-03-04 at 6 18 59 PM

PsiACE commented 2 years ago

so what else I have to do in completing the first task in the list?

Since the expectation for the first task is that the candidate will be familiar with Rust and Casbin, perhaps you could consider trying to maintain our example?

SiddheshKanawade commented 2 years ago

so what else I have to do in completing the first task in the list?

Since the expectation for the first task is that the candidate will be familiar with Rust and Casbin, perhaps you could consider trying to maintain our example?

Sure, I will try to contribute to it, can you please guide me where should I start?

PsiACE commented 2 years ago

Sure, I will try to contribute to it, can you please guide me where should I start?

First, I suggest you check their availability. Then, help them to upgrade their dependencies correctly. In addition to ensuring that they pass CI, I recommend that you build some simple integration tests for them.

SiddheshKanawade commented 2 years ago

Sure, I will try to contribute to it, can you please guide me where should I start?

First, I suggest you check their availability. Then, help them to upgrade their dependencies correctly. In addition to ensuring that they pass CI, I recommend that you build some simple integration tests for them.

Thank you for the help, I will surely try to integrate these suggestions in my code