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

Allow pecl like usage in ext/pdo #3211

Closed
wants to merge 1 commit into from
Closed

Conversation

tianon
Copy link
Contributor

@tianon tianon commented Apr 5, 2018

This is similar to what was discussed/fixed over in #2955, although with a slightly simpler solution.

IMO this is cleaner because it makes the command's arguments match the exact string being tested by make (and could even use $@ / $< if we wanted to get fancy).

Not that it's terribly important, but docker-library/php#618 is the reason this caught my attention (which is on PHP 7.0 and turns out isn't necessary since PDO is included in the image already, but still seemed like a nice thing to send a PR upstream for ❤️).

I'm happy to adjust, rebase, amend, re-target, etc as desired!

@nikic
Copy link
Member

nikic commented Apr 8, 2018

As mentioned in #2955 (comment), the reason why it is currently implemented this way is to avoid including absolute paths in the generate line number annotations. As the generated lexers are committed to the repo, these environment-specific paths will cause unnecessary diffs (and potentially leak information). As far as I can see, this fix also suffers from the same problem, right?

Maybe a better solution would be to cd to $(srcdir) rather than $(top_srcdir) and drop the ext/pdo prefixes?

@tianon
Copy link
Contributor Author

tianon commented Apr 16, 2018

@nikic doh, thanks for pointing that out 🤕

Fixed in 38aa417 to cd $(srcdir) instead (and dropped the subshell since every line in a Makefile runs in a new shell instance). 👍

@weltling
Copy link
Contributor

@tianon IMO it is better to keep the php root relative path, when it comes to checking in into the repo. For the generation under docker it doesn't matter much probably. But that line info can be actually used for debug.

Thanks.

@tianon
Copy link
Contributor Author

tianon commented May 17, 2018

@weltling do you have a concrete alternative proposal that accomplishes that and still fixes the bug?

@weltling
Copy link
Contributor

@tianon i'd suggest same solution as in the PR you mention in the description, please check c5768a7. I'm not sure it makes sense to compile ext/pdo shared, btw. Otherwise, if the Docker on-the-fly process doesn't affect the generated code in the repo, seems acceptable.

Thanks.

@tianon
Copy link
Contributor Author

tianon commented May 17, 2018

Ok, fair enough -- updated in 0f31485 to match the implementation in c5768a7. 👍

@weltling
Copy link
Contributor

Merged as bc6ddb7.

Thanks!

@weltling weltling closed this May 21, 2018
@tianon tianon deleted the pecl-like-pdo branch May 21, 2018 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants