-
Notifications
You must be signed in to change notification settings - Fork 341
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
Slow compilation with via-ir #321
Comments
There's nothing wrong with Forge Std. You just need a set-up that uses via IR only for the contracts in
Here's an example Foundry config: [profile.default]
fs_permissions = [{ access = "read", path = "./optimized-out" }]
libs = ["lib"]
optimizer = true
optimizer_runs = 5_000
out = "out"
script = "script"
solc = "0.8.19"
src = "src"
test = "test"
# Compile only the production code with IR
[profile.optimized]
out = "optimized-out"
test = "src"
via_ir = true |
This reproduction case doesn't demonstrate that forge-std is the issue here. It seems to me that Looking at the recent successful CI runs in this repo, the via-ir builds of forge-std still only take 5 seconds (at the time of #225 it was 30-90 seconds) |
Currently trying to integrate Uniswap's universal router. https://github.com/Uniswap/universal-router
Working with this code requires via-ir. Unfortunately I am experiencing extremely slow compile times:
reproduce:
Compiling with hardhat:
pnpm compile --force 19.11s user 0.45s system 105% cpu 18.468 total
Versions:
forge 0.2.0 (28b2ae6 2023-03-06T00:04:30.253422Z)
solc 0.8.17
I assume this might be related to #225
The text was updated successfully, but these errors were encountered: