Skip to content

fix: debugger doesn't work with external libraries#7504

Merged
mattsse merged 6 commits into
masterfrom
klkvr/update-test-libs
Apr 2, 2024
Merged

fix: debugger doesn't work with external libraries#7504
mattsse merged 6 commits into
masterfrom
klkvr/update-test-libs

Conversation

@klkvr

@klkvr klkvr commented Mar 26, 2024

Copy link
Copy Markdown
Member

Motivation

Closes #7038

Solution

Rewrite Linker a bit to use CompactContractBytecodeCow as there is actually no need for linker to own artifacts in most of the cases

Changes test runner flow to keep library addresses used for the test run and link contracts before running the debugger.

@klkvr klkvr requested review from DaniPopes and mattsse as code owners March 26, 2024 22:27
.results
.iter()
.find(|(_, r)| !r.test_results.is_empty())
.map(|(_, r)| (r, r.test_results.values().next().unwrap()))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this unwrap safe?

@klkvr klkvr Mar 27, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we've just filtered by is_empty above, so I believe yes

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great!

@mattsse mattsse merged commit 85cb9fb into master Apr 2, 2024
@mattsse mattsse deleted the klkvr/update-test-libs branch April 2, 2024 17:11
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

Successfully merging this pull request may close these issues.

Forge test debugger is unable to load sourcemaps for any ContractDefinition that contains references invoking external library functions

3 participants