Skip to content

fix: disable Foundry dynamic test linking - #695

Merged
smonicas merged 2 commits into
crytic:masterfrom
mablr:mablr/fix-foundry-dynamic-test-linking
Jul 27, 2026
Merged

fix: disable Foundry dynamic test linking#695
smonicas merged 2 commits into
crytic:masterfrom
mablr:mablr/fix-foundry-dynamic-test-linking

Conversation

@mablr

@mablr mablr commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

After v1.7.1 Foundry has enabled dynamic test linking by default. The resulting build contains generated sources that are not portable to Crytic Compile consumers, causing compilation failures with Echidna and Medusa.

This scopes FOUNDRY_DYNAMIC_TEST_LINKING=false to the forge build subprocess, preserving previous behavior without changing the caller’s environment or project configuration. It remains compatible with Foundry v1.7.1 and earlier, where dynamic test linking is already disabled by default.

Dynamic test linking produces build-info that Crytic Compile consumers cannot currently parse. Disable it only for the Forge build subprocess while preserving the caller's environment and compatibility with older Foundry releases.
@CLAassistant

CLAassistant commented Jul 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread tests/test_foundry.py

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The test is kinda dummy, idk if you want it or smtg else.

@elopez elopez 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.

Thank you @mablr!

@smonicas
smonicas merged commit 755ecf7 into crytic:master Jul 27, 2026
60 checks passed
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.

4 participants