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

[refactor]: #3268 Globally unique item identifiers #3317

Merged

Conversation

mversic
Copy link
Contributor

@mversic mversic commented Mar 21, 2023

Description of the Change

Rename items so that their names are globally unique within Iroha workspace

Closes #3268

Issue

Attaching #[no_mangle] to exported function whose name is derived based on the name of the struct was causing collisions. This was the preferred solution.

Benefits

Possible Drawbacks

we might want to consider implementing some tests to make sure iroha_schema::TypeId is unique for every type in the codebase

Usage Examples or Tests [optional]

Alternate Designs [optional]

In addition to this we can also consider implementing a hook for custom naming exported functions

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Mar 21, 2023
@mversic mversic force-pushed the globally_unique_item_identifiers branch 2 times, most recently from 0fa9530 to 4570923 Compare March 21, 2023 09:39
@mversic mversic force-pushed the globally_unique_item_identifiers branch from 4570923 to fdebbc2 Compare March 21, 2023 09:45
@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #3317 (80a3d1f) into iroha2-dev (a4d5c9f) will decrease coverage by 7.98%.
The diff coverage is 42.67%.

@@              Coverage Diff               @@
##           iroha2-dev    #3317      +/-   ##
==============================================
- Coverage       62.33%   54.35%   -7.98%     
==============================================
  Files             169      162       -7     
  Lines           31218    31339     +121     
==============================================
- Hits            19459    17034    -2425     
- Misses          11759    14305    +2546     
Impacted Files Coverage Δ
cli/src/lib.rs 0.28% <0.00%> (-69.15%) ⬇️
cli/src/main.rs 0.85% <0.00%> (-0.25%) ⬇️
cli/src/samples.rs 0.00% <ø> (-61.85%) ⬇️
cli/src/torii/mod.rs 0.00% <0.00%> (-27.66%) ⬇️
cli/src/torii/routing.rs 0.00% <0.00%> (-57.11%) ⬇️
cli/src/torii/utils.rs 0.00% <0.00%> (-84.85%) ⬇️
client/src/http_default.rs 0.00% <0.00%> (-38.94%) ⬇️
client_cli/src/main.rs 0.25% <0.00%> (+<0.01%) ⬆️
config/base/src/lib.rs 91.57% <ø> (+55.21%) ⬆️
config/src/lib.rs 33.33% <ø> (ø)
... and 105 more

... and 37 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mversic mversic marked this pull request as draft March 21, 2023 10:51
@mversic mversic force-pushed the globally_unique_item_identifiers branch 9 times, most recently from fe4de64 to 39ec2cf Compare March 23, 2023 12:35
@mversic mversic marked this pull request as ready for review March 23, 2023 12:38
@mversic mversic changed the title [refactor]: Globally unique item identifiers [refactor]: #3268 Globally unique item identifiers Mar 23, 2023
@mversic mversic force-pushed the globally_unique_item_identifiers branch 2 times, most recently from 225f37c to f25f4f3 Compare March 23, 2023 13:29
@mversic mversic force-pushed the globally_unique_item_identifiers branch 4 times, most recently from e48d8a5 to cf40a4c Compare April 5, 2023 09:59
@mversic mversic requested review from 0x009922 and Erigara April 6, 2023 06:39
@mversic mversic force-pushed the globally_unique_item_identifiers branch 8 times, most recently from 06630e8 to 3f2c9e2 Compare April 6, 2023 11:43
mversic added 2 commits April 6, 2023 17:30
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
@mversic mversic force-pushed the globally_unique_item_identifiers branch 2 times, most recently from 949d5ca to 7f1ac77 Compare April 6, 2023 14:46
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
@mversic mversic force-pushed the globally_unique_item_identifiers branch from 7f1ac77 to 80a3d1f Compare April 7, 2023 05:43
@mversic mversic merged commit 05a1b38 into hyperledger-iroha:iroha2-dev Apr 7, 2023
@mversic mversic deleted the globally_unique_item_identifiers branch April 7, 2023 06:08
appetrosyan pushed a commit that referenced this pull request Jun 5, 2023
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic added a commit that referenced this pull request Oct 17, 2023
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants