Closed hellwolf closed 3 months ago
"stack too deep" errors are coming from solc, there's not much we can do to understand which file it originates from :/
I do remember it was not that difficult to know which file/function resulted this. Am I remembering something wrong?
It always was kind of random, sometimes it gives guidance and maybe even a pointer to a Solidity function which triggered this, sometimes it shows and exception like this. I think that's because when "stack too deep" is hit later after some optimizations, it's just hard to track which Solidity file the given piece of code corresponds to.
anyway, those are just Solidity internals :/ I'd recommend try excluding some of the project sources through --skip
to determine which sources are triggering the "stack too deep"
Okay fair. I was basically trying to nail down by skipping files, "--skip" is probably easier to automate the process.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (20b3da1 2024-07-02T00:18:52.435480726Z)
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
Result:
In a larger project, it resulted a situation where such file is very hard to pin point to.