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

Downloader enhancement #685

Merged
merged 23 commits into from
Mar 30, 2025
Merged

Downloader enhancement #685

merged 23 commits into from
Mar 30, 2025

Conversation

crazywhalecc
Copy link
Owner

@crazywhalecc crazywhalecc commented Mar 30, 2025

What does this PR do?

Fix #682

  • Add match pattern for different OS
  • Add pre-built lock for specific OS and libc
  • Quiet console output for non --debug mode

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If you modified *.php, run composer cs-fix at local machine.
  • If it's an extension or dependency update, make sure adding related extensions in src/global/test-extensions.php.
  • If you changed the behavior of static-php-cli, update docs in ./docs/.
  • If you updated config/xxx.json content, run bin/spc dev:sort-config xxx.

@crazywhalecc crazywhalecc added the kind/framework Issues related to CLI app framework label Mar 30, 2025
@DubbleClick
Copy link
Collaborator

DubbleClick commented Mar 30, 2025

I think this may not be as easy as os-arch-libc. Libraries built with glibc 2.17 may not be usable in compilation with glibc >=2.18.

I love the idea, but I'm not sure how realistic this is for non-musl. We may have to only allow this inside the spc-gnu-docker container and throw an error otherwise. Luckily musl build is not affected from this.

@crazywhalecc
Copy link
Owner Author

I think this may not be as easy as os-arch-libc. Libraries built with glibc 2.17 may not be usable in compilation with glibc >=2.18.

We assume all developers build glibc using spc-gnu-docker or CentOS 7 just like described in the documentation.

But what you said makes sense. Maybe we should add an obvious warning or add a libc version suffix?

@DubbleClick
Copy link
Collaborator

Yes, I think os-arch-libc-libcversion should suffice. Since it wouldn't match on non 2.17, it would simply reuse the current functionality of falling back to source download. Good idea.

@crazywhalecc
Copy link
Owner Author

crazywhalecc commented Mar 30, 2025

Another question is: spc-alpine-docker is using alpine:edge as base image. When we use musl, the alpine-based musl version may be upgraded at any time, which will cause confusion.

But musl seems good for updating patch version num. Maybe we just use default for musl-libc version?

@DubbleClick
Copy link
Collaborator

DubbleClick commented Mar 30, 2025

I think musl tries to stay forward compatible, but doesn't guarantee it. Since musl is moving very slowly, I think we could add the version string there too.

I think this is the better idea because the fallback stays functional, whereas a musl forward compatibility break would cause spc to fail.

@crazywhalecc
Copy link
Owner Author

My IP has been banned by GitHub from accessing the API... But everything seems to be working fine so far, including automatic packaging of pre-builts.

https://github.com/static-php/static-php-cli-hosted/actions/runs/14156711781

@crazywhalecc crazywhalecc merged commit 2f3c71e into main Mar 30, 2025
8 checks passed
@crazywhalecc crazywhalecc deleted the downloader-enhancement branch March 30, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/framework Issues related to CLI app framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloader enhancement
2 participants