Skip to content

Include stub hash in generated arginfo files #5739

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

Closed
wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Jun 19, 2020

The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary.

This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files.

The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.
@nikic
Copy link
Member Author

nikic commented Jun 19, 2020

@remicollet This is the idea I mentioned yesterday, to ensure that there is no attempt to regenerate stubs if they haven't changed.

@nikic
Copy link
Member Author

nikic commented Jun 23, 2020

A disadvantage of this change is that stub changes will be prone to merge conflicts.

@cmb69
Copy link
Member

cmb69 commented Jun 23, 2020

Hmm, that's bad, but AIUI it's a normal SHA1 of the stub file, so could be worked around. Not sure.

@remicollet
Copy link
Member

remicollet commented Jun 24, 2020

Looks like this change is really needed....

For this morning, trying to build alpha1

+ make -C build-embedded install-sapi install-headers INSTALL_ROOT=/builddir/build/BUILDROOT/php80-php-8.0.0~alpha1-20.fc31.remi.x86_64
make: Entering directory '/builddir/build/BUILD/php-8.0.0alpha1/build-embedded'
Parse /builddir/build/BUILD/php-8.0.0alpha1/ext/spl/spl_directory.stub.php to generate /builddir/build/BUILD/php-8.0.0alpha1/ext/spl/spl_directory_arginfo.h
sh: wget: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: github.com
Failed to download PHP-Parser tarball

Workaround used for now

for i in $(find ext sapi Zend -name \*stub.php); do
  touch -c -r $i ${i/.stub.php/_arginfo.h}
done

@php-pulls php-pulls closed this in c9b9f52 Jun 24, 2020
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