Skip to content
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

Need to manually delete the out directory to recompile #522

Closed
FredCoen opened this issue Jan 20, 2022 · 8 comments
Closed

Need to manually delete the out directory to recompile #522

FredCoen opened this issue Jan 20, 2022 · 8 comments
Labels
C-forge Command: forge Cmd-forge-build Command: forge build Cmd-forge-test Command: forge test T-bug Type: bug

Comments

@FredCoen
Copy link

After re-compiling with forge build getting the error:
out/console.sol/console.json": No such file or directory (os error 2)

If i manually delete the the out directory it compiles successfully

@onbjerg
Copy link
Member

onbjerg commented Jan 20, 2022

Can you run these commands and post the output for me?

forge clean
tree .
forge build
tree .

And does forge build --force work consistently?

@onbjerg onbjerg added T-bug Type: bug C-forge Command: forge labels Jan 20, 2022
@FredCoen
Copy link
Author

And does forge build --force work consistently? YES

it's a massive project can't send you output of tree from root. do you need the out directory only>?

@onbjerg
Copy link
Member

onbjerg commented Jan 20, 2022

Sure, that'd be fine + your remappings (if any). Also, do you use node_modules or lib?

@FredCoen
Copy link
Author

its an npm project but i remapped solidity imports to lib.

output:

├── AaveILendingPool.sol
│ ├── DataTypes.json
│ ├── ILendingPool.json
│ └── ILendingPoolAddressesProvider.json
├── AaveLendingPoolMock.sol
│ ├── AaveLendingPoolMock.json
│ └── IERC20.json
├── AccessControlUpgradeable.sol
│ └── AccessControlUpgradeable.json
├── AddressUpgradeable.sol
│ └── AddressUpgradeable.json
├── BorrowerPools.sol
│ └── BorrowerPools.json
├── ContextUpgradeable.sol
│ └── ContextUpgradeable.json
├── Contract.t.sol
│ ├── ContractTest.json
│ └── Vm.json
├── ERC165Upgradeable.sol
│ └── ERC165Upgradeable.json
├── ERC721EnumerableUpgradeable.sol
│ └── ERC721EnumerableUpgradeable.json
├── ERC721Upgradeable.sol
│ └── ERC721Upgradeable.json
├── Errors.sol
│ └── Errors.json
├── IAccessControlUpgradeable.sol
│ └── IAccessControlUpgradeable.json
├── IBorrowerManagement.sol
│ └── IBorrowerManagement.json
├── IBorrowerPools.sol
│ └── IBorrowerPools.json
├── IERC165Upgradeable.sol
│ └── IERC165Upgradeable.json
├── IERC20Upgradeable.sol
│ └── IERC20Upgradeable.json
├── IERC721EnumerableUpgradeable.sol
│ └── IERC721EnumerableUpgradeable.json
├── IERC721MetadataUpgradeable.sol
│ └── IERC721MetadataUpgradeable.json
├── IERC721ReceiverUpgradeable.sol
│ └── IERC721ReceiverUpgradeable.json
├── IERC721Upgradeable.sol
│ └── IERC721Upgradeable.json
├── IPlatformManagement.sol
│ └── IPlatformManagement.json
├── IPoolsParametersManagement.sol
│ └── IPoolsParametersManagement.json
├── IPosition.sol
│ └── IPosition.json
├── Initializable.sol
│ └── Initializable.json
├── PausableUpgradeable.sol
│ └── PausableUpgradeable.json
├── PoolLogic.sol
│ └── PoolLogic.json
├── PoolsSettingsManager.sol
│ └── PoolsSettingsManager.json
├── Position.sol
│ └── Position.json
├── Rounding.sol
│ └── Rounding.json
├── SafeMath.sol
│ └── SafeMath.json
├── StringsUpgradeable.sol
│ └── StringsUpgradeable.json
├── Token.sol
│ └── Token.json
├── Types.sol
│ └── Types.json
├── WadRayMath.sol
│ └── WadRayMath.json
├── WadRayMathMock.sol
│ └── WadRayMathMock.json
├── console.sol
│ └── console.json
└── test.sol
└── DSTest.json

@gakonst
Copy link
Member

gakonst commented Jan 20, 2022

Cc @mattsse another ethers-solc cache bug

@carlosdp
Copy link

This error happens to me whenever I run forge test, and subsequently when running forge build. Deleting out/ means I can run forge build successfully again, but running forge test re-introduces that error.

@carlosdp
Copy link

This error happens to me whenever I run forge test, and subsequently when running forge build. Deleting out/ means I can run forge build successfully again, but running forge test re-introduces that error.

More info here: it looks like something in forge test assumes console.sol is part of the build. Adding hardhat's library fixes this.

@onbjerg onbjerg added Cmd-forge-build Command: forge build Cmd-forge-test Command: forge test labels Jan 28, 2022
@gakonst
Copy link
Member

gakonst commented Feb 9, 2022

this should be fixed after the latest ethers-solc rewrite gakonst/ethers-rs#802

@gakonst gakonst closed this as completed Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-build Command: forge build Cmd-forge-test Command: forge test T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

4 participants