-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
StaleInactive old issueInactive old issuearea:hardhat-foundrytype:bugSomething isn't workingSomething isn't working
Description
Version of Hardhat
2.17.3
What happened?
Hardhat does not compile a hybrid foundry project if remappings resolve to folders inside project sources.
Minimal reproduction repo: https://github.com/panukettu/hh-foundry-repro
This does work with [email protected]
+ @nomicfoundation/[email protected]
.
Minimal reproduction steps
hardhat config:
const config: HardhatUserConfig = {
solidity: "0.8.19",
paths: {
sources: "./src/contracts",
},
};
foundry.toml:
[profile.default]
src = 'src/contracts'
out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
remappings = [
'in-sources/=src/contracts/examples/',
'outside-sources/=src/other/',
]
Now making an import eg. import {Lock} from "in-sources/Lock.sol";
will result in:
Error HH415: Two different source names ('src/contracts/examples/Lock.sol' and 'in-sources/Lock.sol') resolve to the same file
Search terms
remappings hardhat-foundry
michcio1234, RohanNero, neelansh15, matallui and SpiralOutDotEuSpiralOutDotEu
Metadata
Metadata
Assignees
Labels
StaleInactive old issueInactive old issuearea:hardhat-foundrytype:bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog