Skip to content
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

Merged
merged 3 commits into from
Apr 16, 2019

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Apr 16, 2019

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.

driusan added 2 commits April 16, 2019 19:28
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];
Copy link

@marcioAlmada marcioAlmada Apr 16, 2019

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 👍

Copy link
Collaborator Author

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.

Copy link
Owner

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...

Copy link
Owner

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...

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.

Copy link
Owner

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...

Copy link
Owner

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...

Copy link
Collaborator Author

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

Copy link

@marcioAlmada marcioAlmada Apr 17, 2019

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.

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

@ircmaxell ircmaxell merged commit b1ff893 into ircmaxell:master Apr 16, 2019
marcioAlmada added a commit to marcioAlmada/yay that referenced this pull request Apr 17, 2019
marcioAlmada added a commit to marcioAlmada/yay that referenced this pull request Apr 17, 2019
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
marcioAlmada added a commit to marcioAlmada/yay that referenced this pull request Apr 17, 2019
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
marcioAlmada added a commit to marcioAlmada/yay that referenced this pull request Jul 20, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants