solidity
solidity copied to clipboard
Add `assemblyJson` as an alias for `legacyAssembly` output in Standard JSON
Abstract
Currently the JSON-based assembly output in Standard JSON is called legacyAssembly
, which makes it seem deprecated. While that was the original intention, we moved away from that and we should rename it to make that clear.
Motivation
Currently we have two assembly formats:
-
assembly
/--asm
(text) -
legacyAssembly
/--asm-json
/--combined-json asm
(JSON)
legacyAssembly
was called that ever since Standard JSON was introduced.
@chriseth says that the legacy format was not machine-readable, and he wanted to remove it eventually. Though it's not certain if it was really the same as current legacy format (the non-machine-readable one was apparently text, not JSON). See also comments from @chriseth and @axic on a related bug.
We're actively using the legacy JSON format for the assembly import feature that's being implemented (#13673) and it seems that if it had problems with ambiguity, those were resolved long ago. For this reason we decided to keep it after all.
Specification
Make "evm.assemblyJson"
a valid value for Standard JSON outputSelection
.
- It should produce the same JSON output that
"evm.legacyAssembly"
does, but under a key calledassemblyJson
.
Backwards compatibility
-
"evm.legacyAssembly"
should keep working exactly as it does now. - Selecting
"*"
should not include"evm.assemblyJson"
for now to avoid including the same, very verbose information twice or breaking the compatibility. We may change that in the future. - Selecting both at the same time should be allowed.
can i work on this issue?
This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.