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

Introduce a lock file #578

Open
dunglas opened this issue Dec 19, 2024 · 1 comment
Open

Introduce a lock file #578

dunglas opened this issue Dec 19, 2024 · 1 comment
Labels
enhancement New feature or request kind/framework Issues related to CLI app framework

Comments

@dunglas
Copy link
Contributor

dunglas commented Dec 19, 2024

It could be nice to introduce a lock file, similar to composer.lock, allowing rebuilding PHP with the exact same version of the dependencies.

This would prevent issues such as #577

@crazywhalecc crazywhalecc added enhancement New feature or request kind/framework Issues related to CLI app framework labels Dec 20, 2024
@crazywhalecc
Copy link
Owner

After a week of long experiments, I think this needs to be carefully considered because it may destroy the existing build process.

  1. Dependencies are defined by lib.json and ext.json, and the lockfile you mentioned should be used to lock dependencies for the current build combination and parameters. But this does not make sense for the same spc version.
  2. If we are locking file of dependencies, the existing .lock.json files for download already implement this feature.
  3. Locking files based on dependency versions requires a lot of work, such as hashing dependency files (including folder types), parsing the version of each dependency library, and so on.

If we just want to achieve a similar effect to composer.lock (to ensure that all current library versions are consistent), we may need to rewrite the logic of the Downloader part. This is because the content downloaded from the same link may change when many dependencies are downloaded, such as when getting the latest version of the extension from pecl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/framework Issues related to CLI app framework
Projects
None yet
Development

No branches or pull requests

2 participants