Comments (5)
All of our operation structures (example: OpPing
) are declared in their src/operations/...
(example: ping.rs
) file.
Clippy, with the pedantic
lint group enabled complains about that as it is a duplication of name:
error: item name ends with its containing module's name
--> src/operations/ping.rs:18:1
|
18 | pub struct OpPing;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::module-name-repetitions` implied by `-D clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
error: item name ends with its containing module's name
--> src/operations/ping.rs:26:1
|
26 | / pub struct ResultPing {
27 | | pub supp_version_maj: u8,
28 | | pub supp_version_min: u8,
29 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
The absolute name of the structure is operations::ping::OpPing
but using namespacing we could rename this structure to be Operation
only and so its absolute name would be operations::ping::Operation
In context where we need to use all the OpXXX
or all the ResultXXX
, we can import operations::{ping, etc}
and use the different ones with ping::Operation
, ping::Result
, etc...
What are you thoughts about that?
from parsec.
That sounds good! We could eiither use ping::Operation
or simply re-export them with an alias at the root of the library, i.e. pub use ...::ping::Operation as OpPing
from parsec.
The same should be done in our other crates.
from parsec.
Following the same logic we should also rename all of our Protobuf operations to remove the PingProto
from OpPingProto
and ResultPingProto
(and all of them) as it will be namespaced correctly (to be checked in other languages, like C).
Otherwise we have the same issue:
use super::generated_ops::ping::{OpPingProto, ResultPingProto};
which seems a bit weird if we do not fix as well.
That would incur a lot of changes to leaving that issue for now.
from parsec.
I will for now add cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::cargo
to our CIs and create a new issue (out of the 1.0.0
milestone) to add the pedantic one.
from parsec.
Related Issues (20)
- Yocto parsec build reports warnings related to build paths HOT 1
- Can we have a single "latest" Quickstart release package?
- Parsec fails to compile for arm32 HOT 4
- Vulnerability in SQLite HOT 3
- Investigate using Arm Virtual Hardware in CI
- Suggest using `/dev/tpmrm0` over `/dev/tpm`
- Parsec 1.1 fails to build with meta-security master branch HOT 4
- Parsec Quickstart - Docker: Pull access denied for parallaxsecond/parsec-quickstart, repository does not exist HOT 1
- Update cryptoki version to `0.4.1` HOT 1
- parsec 1.1.0/1.2.0-rc1 fail to build with gcc13 HOT 3
- Generate arm64 quickstart package
- Provide details of built-in providers
- Investigate e2e_tests failure on RasberryPi for PKCS11 backend
- Investigate e2e_tests failure on RasberryPi for TPM backend
- Migrate away from using users crate HOT 1
- Format check errors should only appear in one CI job
- parsec-quickstart container on arm64 HOT 1
- Improve PKCS11 failure mode HOT 1
- e2e_tests/stress.rs: Signature Verification fails sporadically with PsaErrorInvalidArgument
- parsec-cli-tests.sh error: The CSR does not contain the serialNumber field of the Distinguished Name HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parsec.