Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Remaining renames (metaissue) #4318

Closed
19 of 22 tasks
tomusdrw opened this issue Dec 6, 2019 · 10 comments
Closed
19 of 22 tasks

Remaining renames (metaissue) #4318

tomusdrw opened this issue Dec 6, 2019 · 10 comments
Labels
I7-refactor Code needs refactoring. U2-some_time_soon Issue is worth doing soon.
Milestone

Comments

@tomusdrw
Copy link
Contributor

tomusdrw commented Dec 6, 2019

A tentative list of issues that are still remaining to wrap up the "big refactor" thing.
Most likely it should be one PR per rename (i.e. keep them small and focused) - it's should be just a mechanical work.
Feel free to leave a comment if you work on one.

Crate names:

  • sc-application-crypto -> sp-application-crypto
  • sp-transaction-pool-api -> sp-transaction-pool
  • sp-core-storage -> sp-storage
  • transaction-factory -> substrate-transaction-factory
  • move chain-spec-builder to bin
  • sc-client-api -> sc-api ?
  • sc-client-db -> sc-db ?

Folder names:

  • primitives/sr-arithmetic -> primitives/arithmetic
  • primitives/sr-api -> primitives/api
  • primitives/sr-io -> primitives/io
  • primitives/sr-primitives -> primitives/runtime
  • primitives/sr-sandbox -> primitives/sandbox
  • primitives/sr-staking-primitives -> primitives/staking
  • primitives/sr-std -> primitives/std
  • primitives/sr-version -> primitives/version
  • primitives/block-builder/runtime-api -> primitives/block-builder
  • test/utils -> test-utils
  • client/rpc/api -> client/rpc-api
  • client/utils/wasm-builder-runner -> utils/wasm-builder-runner
  • client/grafana-data-source -> utils/grafana-data-source (?)

Other:

  • Merge sp-serializer with sp-core or sp-runtime
  • Merge sp-transaction-pool-runtime-api with sp-transaction-pool
@tomusdrw
Copy link
Contributor Author

tomusdrw commented Dec 6, 2019

Tackling:

Merge sp-transaction-pool-runtime-api with sp-transaction-pool

@gnunicorn gnunicorn added this to the 2.0 milestone Dec 6, 2019
@gnunicorn
Copy link
Contributor

gnunicorn commented Dec 6, 2019

refs #4099

We also have to clean up the remaining ../client-dependencies in /primitives ... maybe means moving consensus-slots from client to primitives or move around the Traits for it (because sc-consensus-slots has many sc--dependencies)

@tomusdrw
Copy link
Contributor Author

tomusdrw commented Dec 6, 2019

Yeah, I think the SlotData trait just belongs to primitives. Either common or a new crate for slots primitives.

@kigawas
Copy link
Contributor

kigawas commented Dec 9, 2019

primitives/sr-primitives -> primitives/runtime
#4280
primitives/sr-std -> primitives/sp-std
#4327
primitives/sr-io -> primitives/sp-io
#4328

@gnunicorn
Copy link
Contributor

The idea to clean up alias-imports (which I would already apply for folder rename-PRs), is to use a script. The problem is, however, that this is inherently local to the specific crate, so we'd need something that reads the local Cargo.toml-file, finds the aliases, replaces the local alias with the actual package-name and then updates the Cargo.toml. This script can then be applied one at one package at a time (deepest first, probably). But this isn't a trivail thing, and I am not sure it makes sense to do that in bash or maybe even just make a short rust-cli for it.

I have a different thing on my schedule right now, but could see if I can get to it after.

@tomusdrw
Copy link
Contributor Author

tomusdrw commented Dec 9, 2019

@gnunicorn It would be good to finish up all the renames and moves this week, I might find some time to write the script earlier. Let's coordinate to avoid duplicating efforts.

@gnunicorn
Copy link
Contributor

[ ] test/utils -> test-utils

Not sure I agree on that one, test also contains test/client and thus groups the test-area nicely together. I don't see much benefit having test and test-utils in root...

@tomusdrw
Copy link
Contributor Author

tomusdrw commented Dec 11, 2019

@gnunicorn does it really contain test/client?
image

The latest commit only seems to have utils inside, hence I opted in for flattened structure.

@gnunicorn
Copy link
Contributor

@tomusdrw you are right, that was on my local checkout only. sure, let's rename it then.

@gnunicorn
Copy link
Contributor

gnunicorn commented Dec 11, 2019

Re:

  • sc-client-api -> sc-api ?
  • sc-client-db -> sc-db ?

I agree the client- in there is redundant, but neither of the other short-names feels appropriate ... didn't do this yet...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring. U2-some_time_soon Issue is worth doing soon.
Projects
None yet
Development

No branches or pull requests

3 participants