-
Notifications
You must be signed in to change notification settings - Fork 394
refactor(nns): Move governance::init to its own crate to further split type dependencies #490
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f64b9c2
move gov init to its own crate
max-dfinity a60c520
Try to make Cargo like me more
max-dfinity 608331b
Clippy and cargo fix
max-dfinity 632bcd7
Fix some types in tests
max-dfinity f2c9dc2
Automatically updated Cargo*.lock
bbdeb64
Fix more conversions
max-dfinity e46a5d2
Fix more tests
max-dfinity 230ca90
Fix another dependency
max-dfinity 7ae14e0
Automatically updated Cargo*.lock
c289191
Fix another test_feature dep
max-dfinity 0b7d763
Fix another test_feature dep
max-dfinity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| load("@rules_rust//rust:defs.bzl", "rust_library") | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| # See rs/nervous_system/feature_test.md | ||
| BASE_DEPENDENCIES = [ | ||
| # Keep sorted. | ||
| "//rs/nervous_system/common", | ||
| "//rs/nervous_system/common/test_keys", | ||
| "//rs/nns/common", | ||
| "//rs/rosetta-api/icp_ledger", | ||
| "//rs/types/base_types", | ||
| "@crate_index//:csv", | ||
| "@crate_index//:rand", | ||
| "@crate_index//:rand_chacha", | ||
| ] | ||
|
|
||
| # Each target declared in this file may choose either these (release-ready) | ||
| # dependencies (`DEPENDENCIES`), or `DEPENDENCIES_WITH_TEST_FEATURES` feature previews. | ||
| DEPENDENCIES = BASE_DEPENDENCIES + [ | ||
| "//rs/nns/governance/api", | ||
| ] | ||
|
|
||
| DEPENDENCIES_WITH_TEST_FEATURES = BASE_DEPENDENCIES + [ | ||
| "//rs/nns/governance/api:api--test_feature", | ||
| ] | ||
|
max-dfinity marked this conversation as resolved.
|
||
|
|
||
| MACRO_DEPENDENCIES = [ | ||
| # Keep sorted. | ||
| ] | ||
|
|
||
| ALIASES = {} | ||
|
|
||
| rust_library( | ||
| name = "init", | ||
| srcs = glob( | ||
| ["src/**/*.rs"], | ||
| exclude = ["**/*tests.rs"], | ||
| ), | ||
| aliases = ALIASES, | ||
| crate_name = "ic_nns_governance_init", | ||
| proc_macro_deps = MACRO_DEPENDENCIES, | ||
| version = "0.9.0", | ||
| deps = DEPENDENCIES, | ||
| ) | ||
|
|
||
| rust_library( | ||
| name = "init--test_feature", | ||
| srcs = glob( | ||
| ["src/**/*.rs"], | ||
| exclude = ["**/*tests.rs"], | ||
| ), | ||
| aliases = ALIASES, | ||
| crate_name = "ic_nns_governance_init", | ||
| proc_macro_deps = MACRO_DEPENDENCIES, | ||
| version = "0.9.0", | ||
| deps = DEPENDENCIES_WITH_TEST_FEATURES, | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| [package] | ||
| name = "ic-nns-governance-init" | ||
| version.workspace = true | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
| description.workspace = true | ||
| documentation.workspace = true | ||
|
|
||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
| [lib] | ||
| path = "src/lib.rs" | ||
|
|
||
| [dependencies] | ||
| ic-base-types = { path = "../../../types/base_types" } | ||
| ic-nervous-system-common = { path = "../../../nervous_system/common" } | ||
| ic-nervous-system-common-test-keys = { path = "../../../nervous_system/common/test_keys" } | ||
| ic-nervous-system-common-build-metadata = { path = "../../../nervous_system/common/build_metadata" } | ||
| ic-nns-common = { path = "../../common" } | ||
| ic-nns-governance-api = { path = "../api" } | ||
| icp-ledger = { path = "../../../rosetta-api/icp_ledger" } | ||
| rand = { workspace = true } | ||
| rand_chacha = { workspace = true } | ||
|
|
||
| [target.'cfg(not(target_arch = "wasm32"))'.dependencies] | ||
| csv = "1.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.