-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
code healthNice to have code improvementNice to have code improvementcoreCore infrastructure - protocol relatedCore infrastructure - protocol relatedtriageIt requires some decision-making at team level (it can't be worked on as it stands)It requires some decision-making at team level (it can't be worked on as it stands)
Milestone
Description
Objective
Establish a convention of strictly importing "from below".
Origin Document
Observations made while working on #855 have brought to my attention that we are not strictly adhering to this everywhere, resulting in import cycles waiting to happen. This makes refactoring feel a bit like a minefield which will lead to reluctance to do so.
When one encounters such a case, the resulting MVC has a tendency to explode in size and complexity, making it more difficult to reason through for author and reviewer alike.
Goals
- Identify upside-down imports
- Construct a holistic plan for how to restructure effected packages
- Enact the plan
Deliverable
- Add a section to the developer documentation
- Identify all upside-down imports in (sub)module types and members
- E.g.:
/shared/modules/persistence_module.goimports/persistence/blockstore - [P2P] Move
Peerstoreinterface to a module-shared pkg #811 /shared/modules/persistence_module.goimports/persistence/indexer
- E.g.:
- Draft a (holistic) plan for how to restructure effected packages
- Create shared interfaces in and/or moved shared types to (a) shared package(s)
- Refactor each effected module, one-by-one
- P2P
- Persistence
- ...
Non-goals / Non-deliverables
- Identifying or fixing unrelated and non-critical upside-down imports (prioritize (sub)module APIs)
- Unrelated refactoring; e.g. changing APIs, type definitions, etc.
General issue deliverables
-
Update the appropriate CHANGELOG(s) - Update any relevant local/global README(s)
- Update relevant source code tree explanations
- Add or update any relevant or supporting mermaid diagrams
Testing Methodology
- golangci-lint:
make lint - All tests:
make test_all - LocalNet: verify a
LocalNetis still functioning correctly by following the instructions at docs/development/README.md - k8s LocalNet: verify a
k8s LocalNetis still functioning correctly by following the instructions here
Creator: @bryanchriswhite
Co-Owners: @dylanlott
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
code healthNice to have code improvementNice to have code improvementcoreCore infrastructure - protocol relatedCore infrastructure - protocol relatedtriageIt requires some decision-making at team level (it can't be worked on as it stands)It requires some decision-making at team level (it can't be worked on as it stands)
Type
Projects
Status
Rescope