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

Non-reproducible builds in mono-repo setups #14

Open
0xmichalis opened this issue Jun 13, 2022 · 2 comments
Open

Non-reproducible builds in mono-repo setups #14

0xmichalis opened this issue Jun 13, 2022 · 2 comments

Comments

@0xmichalis
Copy link

The action as it is currently set up, is not suitable for a mono-repo where the dependency lock file exists at the top-level of the repo and the target directory where the contracts live is nested because of

pushd "$TARGET" >/dev/null
# JS dependencies
if [[ -f package-lock.json ]]; then
echo "[-] Installing dependencies from package-lock.json"
npm ci
elif [[ -f yarn.lock ]]; then
echo "[-] Installing dependencies from yarn.lock"
npm install -g yarn
yarn install --frozen-lockfile
elif [[ -f package.json ]]; then
echo "[-] Did not detect a package-lock.json or yarn.lock in $TARGET, consider locking your dependencies!"
echo "[-] Proceeding with 'npm i' to install dependencies"
npm i
.

@elopez
Copy link
Member

elopez commented Jun 13, 2022

Hi, thanks for the report! Do you have an example repository you can share to make the structure more clear?

Note that if you have a complex or unsupported build procedure, you can always roll your own build steps as part of the actions workflow and then run the slither action with ignore-compile. You can check the dapp example on the repo readme for general guidance.

@0xmichalis
Copy link
Author

Hi @elopez thanks for the prompt response, appreciate it! Ignoring compilation is a helpful feature, thanks for pointing it out! I'll try to get a minimal repo setup to reproduce this issue.

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

2 participants