substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Rename `spec_name` to `runtime_name` or `name`

Open memorycancel opened this issue 3 years ago • 3 comments

https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/primitives/version/proc-macro/src/decl_runtime_version.rs#L71-L74

The point of this is more straight-forward, the spec_name here should not be confused with spec_version, this make people think it's specification name as opposed to runtime name. As same as the definition in document make people confusing.

image

closes https://github.com/substrate-developer-hub/substrate-docs/issues/1388

memorycancel avatar Aug 10 '22 05:08 memorycancel

Sent from Proton Mail for iOS

On Wed, Aug 10, 2022 at 1:56 AM, memorycancel @.***> wrote:

https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/primitives/version/proc-macro/src/decl_runtime_version.rs#L71-L74

The point of this is more straight-forward, the spec_name here should not be confused with spec_version, this make people think this is specification name as opposed to runtime name. As same as the definition in document make people confusing.

image

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Dairston avatar Aug 10 '22 08:08 Dairston

It is also specification name? I mean what exactly is the difference between specification name and runtime name? The spec_version is the specification version and you are not suggesting to rename it as well.

xlc avatar Aug 10 '22 08:08 xlc

It is also specification name? I mean what exactly is the difference between specification name and runtime name?

Yes, I have the same confusion as you, about the definition of the parameter literally, I am not sure what name to rename.

So, Could we handle this as a expressive issue. Like, we can change the definition

The identifier for the different Substrate runtimes

to

The identifier for the different specification

From my view, the runtime is just a part of specification, right?

memorycancel avatar Aug 11 '22 03:08 memorycancel

I would then vote for:

The identifier of the specification implemented by the runtime.

bkchr avatar Aug 12 '22 08:08 bkchr

@bkchr Thanks for comment, actually I am not confused with the description of the parameter but the name spec_name according to spec_version, anyway this maybe a little nitpicky, just a parameter name.

memorycancel avatar Aug 18 '22 09:08 memorycancel

Sorry, but I don't understand what you mean?

bkchr avatar Aug 20 '22 19:08 bkchr

I think this is Naming Habits issue, closing.

memorycancel avatar Aug 22 '22 01:08 memorycancel