Skip to content

Cross-crate links are not always present #2196

Closed
@EthanYuan

Description

@EthanYuan

Reporting two examples of missing cross-crate links related to re-exports.

example 1

I noticed that in the documentation for the Script struct in the ckb-jsonrpc-types crate (Script), the H256 type is mentioned. However, the H256 type is not linked to its corresponding documentation page in the ckb-fixed-hash-core crate (H256).

Additional Information:

  • Both of these crates are included in the ckb workspace. When running cargo doc --workspace --no-deps --open from the local ckb path, the correct link for the H256 type can be generated.
  • The H256 type is originally defined in ckb-fixed-hash-core.
  • H256 is re-exported in ckb-fixed-hash (which depends on ckb-fixed-hash-core).
  • H256 is re-exported again in ckb-types (which depends on ckb-fixed-hash).
  • The problematic crate ckb-jsonrpc-types depends on H256 from ckb-types.

example 2

In the documentation for the ChainStore trait in the ckb-store crate (ChainStore), the DBPinnableSlice type and DBIter type are mentioned in required methods get and get_iter. However, the types are not linked to its corresponding documentation pages in the ckb-rocksdb crate (DBPinnableSlice and DBIterator).

Additional Information:

  • When running cargo doc --workspace --open from the local ckb path, the correct link for the DBPinnableSlice type and DBIter type can be generated. However, running cargo doc --workspace --no-deps --open produces the same result as described in the issue (i.e., no links are generated).
  • The DBPinnableSlice type and DBIter type are originally defined in ckb-rocksdb.
  • The DBPinnableSlice type and DBIter type are re-exported in ckb-db (which depends on ckb-rocksdb).
  • The problematic crate ckb-store depends on DBPinnableSlice and DBIter from ckb-db.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildsArea: Building the documentation for a crateC-bugCategory: This is a bugE-mediumEffort: This requires a fair amount of work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions