Replace duplicated visualization code in playground with @ethdebug/bugc-react - #180
Merged
Conversation
The playground had local copies of all bugc-react visualization components (AstView, BytecodeView, CfgView, IrView, EthdebugTooltip) plus utilities (debugUtils, irDebugUtils, formatBytecode, bugLanguage). These were pre-extraction originals that diverged from the extracted package. Replace them with imports from @ethdebug/bugc-react and delete the duplicated files. Also removes unused vis-network dependency.
CfgView.tsx imports dagre, so the type declarations need to be available during bugc-react's build. Previously this worked by accident via hoisting from playground.
Contributor
|
Member
Author
Review (from compiler)Clean deduplication — this correctly replaces all local copies with bugc-react imports. Verified:
Minor note:
LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The playground package had local copies of all bugc-react visualization components and utilities — pre-extraction originals that diverged from the extracted package. This replaces them with imports from
@ethdebug/bugc-react, deleting ~2900 lines of duplicated code.Changes:
AstView,BytecodeView,CfgView,IrView,SourceRange, andregisterBugLanguagefrom@ethdebug/bugc-reactCompileResulttypes from bugc-react instead of duplicating definitionssrc/visualization/directory (14 files)bugLanguage.ts(now using bugc-react's version)vis-networkdependency@ethdebug/bugc-reactas dependency and tsconfig reference