-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add hack to composer-install target to include workaround for bug #29
Conversation
This adds a hack to the composer-install target so that it includes a workaround for the bug preventing the macros from being compiled under Circle CI. It also fixes an incorrect quoting in the non-dev Docker image.
$delimiters = $result->{'delimiters'}; | ||
|
||
+ // HACK ALERT: THIS SHOULDN'T HAPPEN AND SHOULD BE FIXED UPSTREAM | ||
+ if (!is_array($context)) $context = [$context]; |
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.
/o\ if you have a way to reproduce, please let me know so we can put it as a .phpt
file at https://github.com/marcioAlmada/yay/tree/master/tests/phpt 👍
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.
@marcioAlmada I don't have one, other than trying to compile this repo with scripts/rebuild.php
. JIT.pre is one that always fails to compile for me, but I don't know what causes it to fail enough to turn it into a useful test case.
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.
Unfortunately I haven't been able to reproduce. Sometimes it happens, sometimes it doesn't. Really quite random...
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.
And by random, I mean changes to macro.yay sometimes cause it, sometimes don't. I haven't found a clear pattern in order to be able to reproduce...
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.
Oh, so it depends on what is being matched. I'll try to poke the call graph.
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.
yeah, but at least preprocess/pre-plugin#18 aims to fix that...
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.
I'm now seeing a bunch of warnings: Warning: count(): Parameter must be an array or an object that implements Countable in /compiler/vendor/yay/yay/src/Ast.php on line 136
But it appears to be successful...
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.
Are you sure you fixed the macro? That sounds like the same warning as before when there was a problem
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.
Some fixes were done at yay/master branch too, so I guess you also have to composer update the deps. I don't know what version of yay
your pre-plugin
is pinning, it's probably not master.
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.
These are the changes that had to be done in your macros: https://gist.github.com/marcioAlmada/6f07c9b0ef7297c9ee82f91bc2a53047
Ex.: ``` Error unpacking a non unpackable Ast node on `$(binary_xor ...? {` at line 29 with context: [ "^" ] Hint: use a non ellipsis expansion as in `$(binary_xor ? {` ``` cc ircmaxell/php-compiler#29
Ex.: ``` Error unpacking a non unpackable Ast node on `$(binary_xor?... {` at line 29 with context: [ "^" ] Hint: use a non ellipsis expansion as in `$(binary_xor ? {` ``` cc ircmaxell/php-compiler#29
Ex.: ``` Error unpacking a non unpackable Ast node on `$(binary_xor?... {` at line 29 with context: [ "^" ] Hint: use a non ellipsis expansion as in `$(binary_xor ? {` ``` cc ircmaxell/php-compiler#29
This adds a hack to the composer-install target so that it includes
a workaround for the bug preventing the macros from being compiled
under Circle CI and on some systems (such as mine).
It also fixes an incorrect quoting in the non-dev Docker image.