Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename types to contain prefixes (Core, Iota, Wasm) #219

Merged
merged 6 commits into from
Apr 30, 2021

Conversation

m-renaud
Copy link
Contributor

@m-renaud m-renaud commented Apr 22, 2021

Description of change

Rename types with common names to contain prefixes.

  • 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

Discussion in #218

Links to any relevant issues

#218

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested

This PR contains type renames and file moves only. Thankfully Rust has a great type system so if it compiles, it should work :)

cargo build and cargo test both succeed.

cargo clippy for target aarch64-apple-darwin passes locally, but for some reason is failing in GitHub actions.

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

@m-renaud m-renaud force-pushed the m-renaud-rename-types branch from dd7a78b to e8efcba Compare April 27, 2021 04:06
@l1h3r
Copy link
Contributor

l1h3r commented Apr 28, 2021

cargo clippy for target aarch64-apple-darwin passes locally, but for some reason is failing in GitHub actions.

Did you run clippy for wasm locally? It runs separately from the main identity- crates 🤯

cargo clippy --manifest-path ./bindings/wasm/Cargo.toml

@m-renaud
Copy link
Contributor Author

m-renaud commented Apr 29, 2021

Did you run clippy for wasm locally? It runs separately from the main identity- crates 🤯

Ahhhh of course!!! All fixed now (hopefully) 🙃

bindings/wasm/src/wasm_verification_method.rs Outdated Show resolved Hide resolved
examples/manipulate_did_document.rs Outdated Show resolved Hide resolved
@l1h3r
Copy link
Contributor

l1h3r commented Apr 30, 2021

@m-renaud thanks for doing this - I'm looking forward to these changes; should be able to merge as soon as those conflicts are resolved 😛

@m-renaud m-renaud force-pushed the m-renaud-rename-types branch from 4014e4b to ceccc9c Compare April 30, 2021 05:43
@m-renaud m-renaud force-pushed the m-renaud-rename-types branch from ceccc9c to 281635d Compare April 30, 2021 17:40
@l1h3r l1h3r merged commit f3d49c7 into iotaledger:dev Apr 30, 2021
@m-renaud m-renaud deleted the m-renaud-rename-types branch April 30, 2021 22:34
olivereanderson pushed a commit that referenced this pull request Oct 25, 2021
* Rename types to contain prefixes (Core, Iota, Wasm)

* Resolve compilation errors in wasm code

* Rename WasmDID to DID in JS.

* Rename IotaMethod->IotaVerificationMethod and WasmMethod->WasmVerificationMethod

* Address @l1h3r comments

* Fix compilation errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants