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

Add support for parsing debug data attributes #14857

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

aarlt
Copy link
Member

@aarlt aarlt commented Feb 15, 2024

@aarlt aarlt self-assigned this Feb 15, 2024
Base automatically changed from add_debugdata_to_assemblyitem to develop February 19, 2024 18:15
@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 5, 2024
@ekpyron ekpyron removed the stale The issue/PR was marked as stale because it has been open for too long. label Mar 6, 2024
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch from 47e3966 to be1913d Compare March 12, 2024 11:35
@aarlt aarlt changed the base branch from develop to replace-jsoncpp-with-nlohmann-json March 12, 2024 11:35
@aarlt aarlt added the has dependencies The PR depends on other PRs that must be merged first label Mar 12, 2024
@ethereum ethereum deleted a comment from github-actions bot Mar 12, 2024
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch 3 times, most recently from b17a4f7 to fe70d58 Compare March 12, 2024 16:54
@aarlt aarlt force-pushed the replace-jsoncpp-with-nlohmann-json branch from a0eb445 to 84df68d Compare March 13, 2024 14:44
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch 3 times, most recently from 8221ce1 to 6396d56 Compare March 14, 2024 15:59
@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 29, 2024
@aarlt aarlt removed the stale The issue/PR was marked as stale because it has been open for too long. label Mar 30, 2024
@aarlt aarlt force-pushed the replace-jsoncpp-with-nlohmann-json branch 3 times, most recently from 983f48b to d2bb60a Compare April 10, 2024 12:03
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch from 6396d56 to e983c75 Compare April 10, 2024 12:04
@aarlt aarlt force-pushed the replace-jsoncpp-with-nlohmann-json branch from 7d1853c to 0ab7dbc Compare April 10, 2024 15:25
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch from e983c75 to 539a523 Compare April 10, 2024 15:56
@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Apr 25, 2024
@aarlt aarlt force-pushed the replace-jsoncpp-with-nlohmann-json branch from 0ab7dbc to cb2b661 Compare April 29, 2024 20:22
@aarlt aarlt removed the stale The issue/PR was marked as stale because it has been open for too long. label Apr 30, 2024
@aarlt aarlt force-pushed the replace-jsoncpp-with-nlohmann-json branch 4 times, most recently from c0710bf to 87d86bf Compare May 6, 2024 11:02
@aarlt aarlt removed the stale The issue/PR was marked as stale because it has been open for too long. label Jun 25, 2024
@ethereum ethereum deleted a comment from github-actions bot Jun 25, 2024
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch 15 times, most recently from a783743 to 161f0b1 Compare July 10, 2024 18:15
@aarlt aarlt changed the title [yul] Add support for parsing debug data attributes. [ethdebug] Add support for parsing debug data attributes. Jul 11, 2024
@cameel cameel changed the title [ethdebug] Add support for parsing debug data attributes. Add support for parsing debug data attributes. Jul 24, 2024
@cameel cameel changed the title Add support for parsing debug data attributes. Add support for parsing debug data attributes Jul 24, 2024
@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Aug 7, 2024
@ethereum ethereum deleted a comment from github-actions bot Aug 7, 2024
@aarlt aarlt removed the stale The issue/PR was marked as stale because it has been open for too long. label Aug 7, 2024
@aarlt aarlt force-pushed the yul_parse_debugdata_attributes branch from 161f0b1 to 34249a2 Compare August 12, 2024 13:47
@ekpyron ekpyron added the 🟡 PR review label label Aug 15, 2024
@ekpyron ekpyron removed the has dependencies The PR depends on other PRs that must be merged first label Aug 29, 2024
}
}
// ----
// SyntaxError 5721: (37-65): @debug.merge: Could not parse debug data: parse error at line 1, column 12: syntax error while parsing object - unexpected end of input; expected '}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this always error out now on invalid @debug.* attributes? What happened before if we had this kind of attribute? If this compiled before the change, we need to wonder if this is breaking (and should only be parsed if enabled somehow) - even though it may be fine in practice. But can you explain how this behaved before the PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cameel what would you say to this? this is technically breaking, but would you say its ok?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will just base on #15289. So attribute parsing is only enabled, if ethdebug was requested.

Copy link
Member

@cameel cameel Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this would be ignored before and now it is an error. I checked now and I see that when we introduced the @src tag we did it like this too - solc 0.8.8 just started issuing errors on invalid @src tags. So there is a precedent for ignoring such minor breaking changes.

Similarly in #15209, we were careful not to be completely breaking, but it was still too constraining to keep it 100% compatible for every minor irrelevant detail - e.g. now single quotes are supported and you'll get an error on an unmatched quote, which previously would have been not recognized as the beginning of a string and ignored.

So I'd say it's fine if it's a minor thing unlikely to happen in practical use and the alternative requires too much effort. It should still be documented in the changelog though. Looks like you found a good alternative though - parsing it only with ethdebug enabled - so I'd go with that.

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

Successfully merging this pull request may close these issues.

None yet

3 participants