Skip to content

Have consistent naming for imported SDK and internal packages #3986

@roman-khimov

Description

@roman-khimov

Is your feature request related to a problem? Please describe.

I'm always frustrated when the same packages can be named differently in the codebase. One of the sources of this trouble is that we have similarly named packages from SDK and node codebases, then in some cases the original name is used for SDK package, in some cases it's used for internal one, or we can have prefixes or suffixes added arbitrarily. For example, github.com/nspcc-dev/neofs-sdk-go/netmap is known as netmap, netmapsdk, sdknetmap, netmapSDK and then github.com/nspcc-dev/neofs-node/pkg/core/netmap can be known as netmap, netmapcore, corenetmap or netmapCore. This is very annoying.

Describe the solution you'd like

Follow simple rules set by 4c71c2d and b17da10:

  • SDK packages are never renamed, always imported as is
  • packages from local pkg/core prefix are named and imported with core suffix, so for pkg/core/netmap netmapcore is the name of the package used everywhere
  • packages from github.com/nspcc-dev/neofs-sdk-go/proto/ are imported with proto prefix, like protoobject, protostatus, etc.

Describe alternatives you've considered

No alternatives.

Additional context

#3748.

Metadata

Metadata

Labels

I4No visible changesS3Minimally significantU4Nothing urgentenhancementImproving existing functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions