Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rooooooooob opened this issue Feb 8, 2023 · 1 comment
Open

Comments

@rooooooooob
Copy link
Collaborator

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?)
@SebastienGllmt
Copy link
Collaborator

we could also put these in a special file just for these imports that have no place to go. Also not great either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants