mpf-mc icon indicating copy to clipboard operation
mpf-mc copied to clipboard

🍒 Cherry Pick #452 fix for windows audio issue to 0.56

Open avanwinkle opened this issue 1 year ago • 3 comments

This PR cherry-picks PR #452 into 0.56 release branch to assist folks not yet ready to jump into prerelease 0.57. It bypasses the Windows circular dependency issue on importing audio libraries.

can you hear me?

avanwinkle avatar Oct 14 '23 20:10 avanwinkle

I'm a little confused about the automated tests, this PR is targeting 0.56.x but the tests are trying to install 0.57, which is failing on Python 3.7 (as expected).

avanwinkle avatar Oct 14 '23 21:10 avanwinkle

There's some logic in the GitHub workflow to attempt to pull in the matching version of MPF. It's these lines:

git clone --recursive --branch ${{ github.ref_name }} https://github.com/missionpinball/mpf.git _mpf ||
git clone --recursive --branch `python get_version.py` https://github.com/missionpinball/mpf.git _mpf ||
git clone --recursive --branch dev https://github.com/missionpinball/mpf.git _mpf &&

It first tries to clone an MPF branch which matches the branch or tag name that triggered it. (Which I think for PRs include the PR number or something so prob that would fail.) If that fails the next try is using the python get_version.py which is in the root of the mpf-mc repo and looks like this:

from mpfmc._version import __short_version__
print("{}.x".format(__short_version__))

So that should print 0.56.x which is a valid MPF branch and should work. 🤷‍♂️

If that fails it gets the dev branch is what's happening here.

Looking at the logs that fail:

python: can't open file 'get_version.py': [Errno 2] No such file or directory

So, first, I wonder how long that's been failing? Maybe we never noticed since I was working in branches and not PRs. My guess is it's a path thing. It might require a ../ or mpf-mc/ first or something? You could throw a pwd into the script before that line to see where it's running from if you don't mind experimenting a bit?

toomanybrians avatar Oct 15 '23 04:10 toomanybrians

Also while you're in there, you wanna re-enable the windows builds?

(The Mac ARM ones I still can't figure out even though allegedly GitHub offers Apple Silicon runners. My confusion is documented here.)

toomanybrians avatar Oct 15 '23 04:10 toomanybrians