-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: only default to -U
if there is not a version
in the config [APE-1180]
#26
Conversation
-U
if there is not versions in the config-U
if there is not versions in the config [APE-1180]
-U
if there is not versions in the config [APE-1180]-U
if there is not a version
in the config [APE-1180]
@@ -16,7 +16,7 @@ inputs: | |||
ape-plugins-list: | |||
description: 'Space seperated list of plugins to install with relevant pinning applied' | |||
required: False | |||
default: '-U .' | |||
default: '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be just .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I don't think so anyway.
This is how it works:
If the user is not specifying anything here (using the default), it will calculate a default.
if we make the default ".", it would not be very easy to detect whether the user has specified "." or they are using the default behavior.
Note: when this is released, update the major version tag and tag it as a new minor too |
I was trying to avoid the breaking change because the default value will still be used in all cases where it worked. |
No I mean update the current |
hey @antazoey @fubuloubu, I'm not 100% sure but I think this PR broke my CI pipeline: https://github.com/pcaversaccio/snekmate/actions/runs/6057836515/job/16439414869#step:6:1219 My name: snekmate
contracts_folder: src
default_ecosystem: ethereum
plugins:
- name: vyper
vyper:
evm_version: shanghai and the CI setup: - name: Setup Ape
uses: ApeWorX/github-action@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check Ape compilation
run: ape compile Could you maybe have a look at this quickly since it's pretty important for snekmate as it's part of the test smart contracts pipeline and I need to push some updates that won't get tested currently due to this failure. |
I reverted the |
Thanks a lot @fubuloubu. The bash script seems to throw somehow: Run if [[ "true" == "true" ]]; then
if [[ "true" == "true" ]]; then
version_present=$(sed -n '/^plugins:/,/^[^ ]/{/version:/p;}' "ape-config.yaml" | grep -c version)
else
version_present=0
fi
if [[ "${version_present}" == "1" ]] && [[ -z "" ]]; then
plugins_value="."
elif [[ -z "" ]]; then
plugins_value="--upgrade ."
else
plugins_value=""
fi
ape plugins install "$plugins_value"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.4/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.4/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.4/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.4/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.4/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.4/x64/lib
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/7b472a5e-f65c-4e38-9823-f9a532a9bbef.sh
Error: Process completed with exit code 1. |
It looks like a bug in "version_present" variable not interpolating and being compared as a literally. I'll fix after the weekend. |
im pretty positive this fixes all the issues: #29 |
FWIW, you can simply fork my repo and run the CI |
Ok, I did that here: https://github.com/antazoey/snekmate/actions/runs/6085791567/job/16510699465?pr=1 |
Awesome, thanks for the heads-up! |
(finishes) fixes: #16
Before, if you didn't specify any
ape-plugins-list
input, it would always try-U .
.However this causes issues when the
ape-config.yaml
file contains version specifications.Thus, to fix, we detect if there are versions specified in the yaml. If there are, default to only
.
. Else, default to-U .
as we did before.So this is not a breaking change because it will still work as it did except in the times when it didn't work at all, now it will work then too, so it is just a bugfix
As a plus, I added tests
. Look at the CI!