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

dapp looks inside ./lib/ even for "innocent" commands #734

Open
livnev opened this issue Aug 11, 2021 · 3 comments
Open

dapp looks inside ./lib/ even for "innocent" commands #734

livnev opened this issue Aug 11, 2021 · 3 comments

Comments

@livnev
Copy link
Member

livnev commented Aug 11, 2021

This is quite weird behaviour:

~ » mkdir /tmp/dappthing && cd /tmp/dappthing
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/tmp/dappthing » dapp --version
dapp 0.32.2
solc, the solidity compiler commandline interface
Version: 0.6.7+commit.b8d736ae.Linux.g++
hevm 0.46.0
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/tmp/dappthing » mkdir -p lib/foo
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/tmp/dappthing » dapp --version
dapp-remappings: error: ./lib/foo is not a Git repository
dapp-remappings: error: try "dapp update" to initialize submodules
dapp 0.32.2
solc, the solidity compiler commandline interface
Version: 0.6.7+commit.b8d736ae.Linux.g++
hevm 0.46.0

Namely, there are some commands, for example dapp --version, dapp --nix-run etc. that shouldn't expect us to be inside a dapp-structured project. I was told this might be relevant for PR #719

@livnev livnev changed the title dapp looks inside ./lib/ even for "innocent commands" dapp looks inside ./lib/ even for "innocent" commands Aug 11, 2021
@transmissions11
Copy link
Contributor

Coverage does too

@d-xo
Copy link
Contributor

d-xo commented Sep 7, 2021

hmmmm, yeah this is unfortunate.

This line is the culprit:

export DAPP_REMAPPINGS=${DAPP_REMAPPINGS-"$(dapp-remappings)"}

@d-xo
Copy link
Contributor

d-xo commented Sep 7, 2021

This will be partially fixed by #719 since adds a a non git based directory hashing strategy to dapp remappings (albeit a quite expensive one: recursively hashing every file in the directory), but perhaps we can do better by only calling dapp remappings inside of dapp build...

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

No branches or pull requests

3 participants