Skip to content

Multi-file implicit map/array wasm wrappers - where to declare? #138

Open

Description

@rooooooooob

We need to standardize where to declare map/array wasm wrappers when they're implicit e.g.:

foo = {
    implicit_arr: [* bar]
    implicit_map: { * abc => xyz }
}

Currently it's fine when there's only one file they could exist in but this could potentially not be the case.

Some first possibilities are:

  1. declare where the element is declared
  2. declare where it was used

However for maps 2) is problematic as there are potentially two types and for both both 1)/2) are problematic as there could be two different areas using the same type implicitly potentially.

We could potentially either:

  1. Make a priority where it goes something like: try where element(s) declared -> try where used -> lib.rs as fall-back if neither are consistent
  2. Just always put them in lib.rs (can be weird e.g. why is TransactionBodyList in lib.rs when it's only used in block.rs and TransactionBody is in transaction.rs?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions