Open ChristophWurst opened 4 years ago
Btw https://github.com/ChristophWurst/rubix-ml-mozart was created to showcase this issue. You should be able to clone and reproduce the error.
Hi @ChristophWurst, I need to take a proper look at your showcase repository. Thanks for setting that up. Just wanted to let you know that I'm looking at it and not simply ignoring your issue. 😄
No worries and take your time. This is not a pressing for us and we're using your lib for free after all :wink:
If there is anything I can help with please let me know :pray:
Mozart is quite a game changer for us at Nextcloud, btw, as we suffer form the same conflict problem Wordpress faces https://blog.wuc.me/2020/05/13/rock-me-amadeus-php-dependency-hell.html.
I wanted to give this another shot as we have to move forward with our app. So I updated the dependencies in https://github.com/ChristophWurst/rubix-ml-mozart, but it still gives me the exact same error. @coenjacobs do you have any ideas of where to start looking?
Edit: So I tried to attach a debugger and step through the code. Unfortunately that didn't enlighten me, I'm still struggling to understand the expected behavior vs what's happening right now.
PR #63 addresses it :
{
"name": "christophwurst/rubix-ml-mozart",
"license": "MIT",
"authors": [
{
"name": "Christoph Wurst",
"email": "christoph@winzerhof-wurst.at"
}
],
"require": {
"rubix/ml": "*"
},
"require-dev": {
"coenjacobs/mozart": "dev-master",
"cweagans/composer-patches": "~1.0"
},
"scripts": {
"post-install-cmd": [
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-update-cmd": [
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
]
},
"extra": {
"patches": {
"coenjacobs/mozart": {
"issue-48": "https://github.com/coenjacobs/mozart/pull/63.patch"
}
},
"mozart": {
"dep_namespace": "Test\\Vendor\\",
"dep_directory": "/lib/Vendor/",
"classmap_directory": "/lib/autoload/",
"classmap_prefix": "TEST_",
"delete_vendor_directories": false
}
}
}
but the PR with the fix fails the tests so can't be merged. I don't really have time to look at that now.
The issue was how processing the autoloader config was handling multiple namespaces in the same composer.json's PSR4 key, you can see that only one of the namespace names will survive the loop.
Awesome work @BrianHenryIE. Thanks a lot :raised_hands:
Hi again,
I have another lib that causes trouble. It's
rubix/ml
. The installation fails withwhen it tries to write https://github.com/ChristophWurst/rubix-ml-mozart/blob/master/lib/Vendor/JAMA/Matrix.php. I tried the
override_autoloader
like in the readme (https://github.com/ChristophWurst/rubix-ml-mozart/commit/597515eefb9070ea49e3d85f0164338b969e2b79) but that will lead to incorrect namespaces on thearray_transpose
function.I'm a bit lost with where to look or what to debug. I'd be grateful for any help or pointers :pray:
Cheers