-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[big refactor] Remove crate aliasing. #4395
Conversation
Resolving conflicts now. |
@tomusdrw is there a polkadot fix for this yet? |
@gavofyork it shouldn't be necessary. This PR does not rename any of the crates, just changes how we import them internally in substrate. I'll check if it works correctly though tomorrow morning. |
Ah, just realised that because I've changed couple of defaults in our macros it might now expect |
@tomusdrw if the revert is easy enough, let's do that. I agree that having renames within construct runtime is probably nicer and as those aren't what is usually mixed up ( |
I've reverted the changes in |
In rust 2015 people could do
|
* Rename: Phase 1. * Unify codec. * Fixing: Phase 2 * Fixing: Phase 3. * Fixing: Phase 4. * Fixing: Phase 5. * Fixing: Phase 6. * Fixing: Phase 7. * Fixing: Phase 8. Tests * Fixing: Phase 9. Tests!!! * Fixing: Phase 10. Moar tests! * Finally done! * More fixes. * Rename primitives:: to sp_core:: * Apply renames in finality-grandpa. * Fix benches. * Fix benches 2. * Revert node-template. * Fix frame-system in our modules.
This PR removes (almost) all crate renames in the repository. The only exceptions are external crates: like
parity-scale-codec
andfinality-grandpa
.Related: #4099 , #4318
Open issues:
2.1. Renaming
system
does not really work well, in some places we just assume that it's renamed. There is awhere system = X
but I feel it doesn't really work well and IMHO should better be removed to simplify macros. You can always rename withuse X as system;
.2.2. It affects
GenesisConfig
and generatedEvent/Call
.pallet_
prefix is present in many places.My gut feeling is that we should still rename whenever we construct the runtime, but avoid renames in every other part of code (CC @bkchr, @gavofyork). Happy to add a commit to this PR to revert the renames in
node-template/runtime
,node/runtime
andtest-utils/runtime
.