metacall / distributable-macos

MacOs redistributable for shipping MetaCall Core.
Apache License 2.0
1 stars 6 forks source link

fix: tests #27

Closed FirePing32 closed 3 weeks ago

viferga commented 3 weeks ago

I cannot merge this at all because of the following reasons, this is the current state of the master branch in this repo:

tests-failing-macos

If you go to those CIs that have failed, you will see this:

pkg-test:

λ Error: DynLink error: dlopen(/opt/homebrew/Cellar/metacall/0.8.3/lib/libpy_loader.so, 0x0009): Library not loaded: /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python
  Referenced from: <EE098C63-89DB-3F3F-949F-FB85EDBB6AC0> /opt/homebrew/Cellar/metacall/0.8.3/lib/libpy_loader.so
  Reason: tried: '/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python' (no such file)
Error: Failed to load library from plugin descriptor
Error: Plugin loader from manager 'loader' failed to load plugin: py

tgz-test:

2024-08-27T21:54:12.4611750Z λ Error: DynLink error: dlopen(/Users/runner/work/distributable-macos/distributable-macos/distributable/Cellar/metacall/0.8.3/lib/libpy_loader.so, 0x0009): Library not loaded: /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python
2024-08-27T21:54:12.4615390Z   Referenced from: <EE098C63-89DB-3F3F-949F-FB85EDBB6AC0> /Users/runner/work/distributable-macos/distributable-macos/distributable/Cellar/metacall/0.8.3/lib/libpy_loader.so
2024-08-27T21:54:12.4619530Z   Reason: tried: '/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/Python' (no such file)
2024-08-27T21:54:12.4622700Z Error: Failed to load library from plugin descriptor
2024-08-27T21:54:12.4623850Z Error: Plugin loader from manager 'loader' failed to load plugin: py

The tests are basically failing because the rpath is not defined properly, not because of the metacall executable is not found as you told me in Discord.

Now if we check your CI run: tests-failing-macos-2

There is one more test failing than the current state of the master branch, and if we go to your CI tests to check the logs:

That issue is already solved in master. The current master has reached to find the executable already, the only problem remaining is to solve the rpath properly, which I am thinking to solve in the brew-pkg side. I do not understand why you keep telling me this is not working on the master branch, because it is already with the current metacall/homebrew recipe. The last change I already did is working and this PR is not necessary: https://github.com/metacall/homebrew/pull/21

Maybe I am missing something but I do not get the point of this, you have submitted this twice and the problem you are trying to solve is already solved.

The next step is to add this https://stackoverflow.com/questions/19209515/how-to-make-xcode-project-with-homebrew-libraries-portable/47897552#47897552 into brew-pkg and solve the rpath issues on the tgz tests.

And also if we do TDD properly as I am trying to do, I should not merge something that breaks on the CI or breaks the tests if they are already working.