[DONE] Proposal: Rename IOTA DID types #218
Replies: 3 comments 8 replies
-
@JelleMillenaar @Aconitin @l1h3r PTAL! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@m-renaud thanks for doing this! Some thoughts
I would prefer option (2) - way better for users and shouldn't be too much overhead for the WIP PRs |
Beta Was this translation helpful? Give feedback.
6 replies
-
One more question: should I change |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal Summary
Rename IOTA-specific DID types to contain an
Iota
prefix, and update filenames to match.Status
Implemented: #219 #243
Motivation
There are currently a proliferation of types in the
identity.rs
package with the same name, but in different directories and crates, with unique semantics and validation logic (DID
,Document
, andMethod
to name a few). This makes understanding the codebase more difficult because one constantly needs to check which version of the type is beinguse
'd in a given file. As a smaller matter, the re-use of the same filename multiple times makes navigating the codebase in an editor more challenging, forcing you to always double check the path.Proposal
Summary
Core
prefix (eg.Document
->CoreDocument
)Iota
prefix (eg.DID
->IotaDID
)iota_
prefix (eg.did.rs
->iota_did.rs
)Wasm
prefix (eg.DID
->WasmDID
)wasm_
prefix (eg.did.rs
->wasm_did.rs
)document.rs
->diff_document.rs
)Details
In this section we list the full set of renames to perform:
Completed in #219
identity-did/src/document/document.rs
->identity-did/src/document/core_document.rs
Document
->CoreDocument
identity-did/src/verification/method.rs
->identity-did/src/verification/verification_method.rs
Method
->VerificationMethod
identity-iota/src/did/doc/document.rs
->identity-iota/src/did/doc/iota_document.rs
Document
->IotaDocument
identity-iota/src/did/doc/method.rs
->identity-iota/src/did/doc/iota_method.rs
Method
->IotaMethod
identity-iota/src/did/url/did.rs
->identity-iota/src/did/url/iota_did.rs
DID
->IotaDID
bindings/wasm/src/document.rs
->bindings/wasm/src/wasm_document.rs
Document
->WasmDocument
bindings/wasm/src/method.rs
->bindings/wasm/src/wasm_method.rs
Method
->WasmMethod
bindings/wasm/src/did.rs
->bindings/wasm/src/wasm_did.rs
DID
->WasmDID
Optional (file rename only, reduces the number of times you open the wrong
document.rs
:P)Completed in #243
identity-iota/src/chain/document.rs
->identity-iota/src/chain/document_chain.rs
DocumentChain
(no change)identity-iota/src/chain/diff.rs
->identity-iota/src/chain/diff_chain.rs
DiffChain
(no change)identity-iota/src/did/doc/diff.rs
->identity-iota/src/did/doc/document_diff.rs
DocumentDiff
(no change)identity-did/src/diff/document.rs
->identity-did/src/diff/diff_document.rs
DiffDocument
(no change)identity-did/src/diff/method.rs
->identity-did/src/diff/diff_method.rs
DiffMethod
(no change)identity-did/src/diff/service.rs
->identity-did/src/diff/diff_service.rs
DiffService
(no change)identity-did/src/diff/did_key.rs
->identity-did/src/diff/did_key_diff.rs
Diff
impl forDIDKey
(no change)When should we do this?
We have three options for when to do this:
In both options (2) and (3) there will be churn for anyone who currently has a PR in progress or local branches.
Preferences
(2): @m-renaud @l1h3r
Timeline
If we agree on (2), we should make these changes in the next ~2-3 weeks.
If we agree on (3), we can revisit in the future.
NOTE: A temporary moratorium on PRs would help reduce repeated rebases/merges.
Who?
I (@m-renaud) can own these changes.
Changelog
Any changes to the proposal as a result of discussions will be reflected here. When the proposal is finalized we can create an issue to track the changes and point back to this discussion.
Beta Was this translation helpful? Give feedback.
All reactions