You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2022. It is now read-only.
I figured it was good to make a dedicated issue for this given the discussion happening on a few other places at this point as well. In the module linking proposal the initial sections (type, module, instance, and alias), can all appear interleaved. This issue is intended to ask the question "how do we represent this in the text format?" Some current known things are:
Ideally the text format is "round-trip-able" where given any sequence of sections in a binary module when printed there's a way you can convert that text back to binary and produce the same module.
This seemed independent enough from other issues that it might be good to have a singular place to discuss here! One possible option I'd propose is new grouping constructs like (aliases ...), (types ...), (imports ...), etc. Internally they would only allow the corresponding field to be declared and they would be serialize as-is with the group. Top-level singular items would then be sorted in a predefined order (e.g. types, imports, modules, instances, aliases) and would just simply be an error in validation if they referenced one another. This is not a great solution, though, and I hope a better idea is found.
The text was updated successfully, but these errors were encountered:
As of #35, I think this question is answered with: we don't need to backwards-compatibly support forward references in the text format of adapter modules, so only backwards references are allowed. In general, with adapter modules, I think the processing model is to linearly walk, definition-by-definition, through the adapter module definitions and maintain a type environment (sortof like we do when validating instructions in core function bodies).
I'll tentatively close this issue, but if there are still open questions, please feel free to reopen.
I figured it was good to make a dedicated issue for this given the discussion happening on a few other places at this point as well. In the module linking proposal the initial sections (type, module, instance, and alias), can all appear interleaved. This issue is intended to ask the question "how do we represent this in the text format?" Some current known things are:
so should this keep working?
There should probably be a mechanism for @custom and repeated sections annotations#11 where custom sections may need to be explicitly placed after a particular header section.
Ideally the text format is "round-trip-able" where given any sequence of sections in a binary module when printed there's a way you can convert that text back to binary and produce the same module.
This seemed independent enough from other issues that it might be good to have a singular place to discuss here! One possible option I'd propose is new grouping constructs like
(aliases ...)
,(types ...)
,(imports ...)
, etc. Internally they would only allow the corresponding field to be declared and they would be serialize as-is with the group. Top-level singular items would then be sorted in a predefined order (e.g. types, imports, modules, instances, aliases) and would just simply be an error in validation if they referenced one another. This is not a great solution, though, and I hope a better idea is found.The text was updated successfully, but these errors were encountered: