crytic / amarna

Amarna is a static-analyzer and linter for the Cairo programming language.
https://blog.trailofbits.com/2022/04/20/amarna-static-analysis-for-cairo-programs/
GNU Affero General Public License v3.0
148 stars 7 forks source link

Pin packages in requirements.txt #13

Open achab opened 2 years ago

achab commented 2 years ago

Hello team, thanks a lot for building amarna! Could you pin the packages on the file requirements.txt? There is a currently conflict on cairo-format with the current latest versions of cairo-lang and amarna. To reproduce it, on Python 3.7.2, you can run the following code:

python -m venv .venvtest
source .venvtest/bin/activate
pip install --upgrade pip
pip install cairo-lang

cairo-format # it works

pip install git+https://github.com/crytic/amarna.git@main

cairo-format # it fails
fcasal commented 2 years ago

Hi @achab, thanks for reporting this. The issue happens because cairo-lang uses an old version of lark (0.12). I've added versions to the requirements file (https://github.com/crytic/amarna/commit/4015dffbcb3962c63babe495325ac553e8a9e84a) but this does not fix the issue.

For now, the best solution is to use two virtual environments. Another option that works (for now) is to first install amarna, and then cairo-lang.

achab commented 2 years ago

Thanks a lot for the details, and thanks for the temporary solution !