substrate icon indicating copy to clipboard operation
substrate copied to clipboard

contracts: Rework generated API docs

Open athei opened this issue 2 years ago • 2 comments

Follow up for https://github.com/paritytech/substrate/pull/13032

Initially, different versions of APIs are emitted into different modules. IMHO that makes discovering all functions harder because you need to look through all modules. Additionally, we also emitted all the functions twice which are exist under different prefixes.

This PR changes this behaviour by only emitting the newest and unprefixed version of each function. Hence we now only have a single trait containing everything relevant.

athei avatar Jan 19 '23 16:01 athei

Let's take a step back and think about who uses this documentation and for what: I argue someone who implements a contract (language). This person first and foremost wants to have a good overview of the functionality that is available to them. Not an archive of outdated aliases and versions. That is mostly noise to this person. This person was me. This is why I created this PR.

I'd say that we probably want both. The overview of the complete and current API and also the archive of legacy functions (what we had before this PR).

athei avatar Jan 20 '23 17:01 athei

yeah that will need some rework to include the old format, too. will do when I get to it. No high priority to merge this anyways.

athei avatar Jan 24 '23 21:01 athei

bot merge

athei avatar Feb 08 '23 17:02 athei

Waiting for commit status.

Merge cancelled due to error. Error: Statuses failed for c8197f74a66526fb79e08014d9318e64b4b3be0b