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

Plugin install promise must be scheduled after all required package promises are done #11941

Open
mvorisek opened this issue Apr 20, 2024 · 5 comments
Labels

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Apr 20, 2024

I am developing roundcube/plugin-installer#50 and it seems roundcube/roundcubemail package is installed* after the plugin installer.

steps to reproduce:

https://github.com/roundcube/plugin-installer/blob/9b0dffcc1b/.github/workflows/ci.yml#L93-L105

* by installed I mean available on filesystem to be used

Reproducible on linux only, I was not able to reproduce it locally on Windows.

When I revert roundcube/plugin-installer@4204c4b356 the issue is gone. But the repository is the same, the difference is only how the repo is installed, newly installed using zip, previously installed using git.

@mvorisek mvorisek changed the title Schedule plugin install promise after all required package promise Schedule plugin install promise after all required package promises are done Apr 20, 2024
@mvorisek mvorisek changed the title Schedule plugin install promise after all required package promises are done Plugin install promise must be scheduled after all required package promises are done Apr 20, 2024
@Seldaek
Copy link
Member

Seldaek commented Apr 29, 2024

Yes.. as roundcube/roundcubemail requires roundcube/plugin-installer, we have to install the plugin first.

We always install dependencies first, so that when a package is installed what it depends on is ready to be used.

The only difference with git is that it might have cloned the repo already in the download step (where as zip downloads into the cache), but the package is not technically installed.

@mvorisek
Copy link
Contributor Author

Yes.. as roundcube/roundcubemail requires roundcube/plugin-installer, we have to install the plugin first.

Thank you. I missed this circular dependency.

The only difference with git is that it might have cloned the repo already in the download step (where as zip downloads into the cache), but the package is not technically installed.

Git is always cloned to a cache first. Shouldn't the "download phase" for git be aligned with zip to do the "extraction" (from a git cache) at the "install phase" then?

@Seldaek
Copy link
Member

Seldaek commented Apr 29, 2024

I think it's a bit more complicated than that, and extracting it all would be possible but a bunch of work which really does not matter too much..

@mvorisek
Copy link
Contributor Author

mvorisek commented May 3, 2024

How can I schedule the https://github.com/roundcube/plugin-installer/blob/331e0791b3/src/ExtensionInstaller.php#L78 promise either after full install or at least after some specific package is installed?

@Seldaek
Copy link
Member

Seldaek commented May 3, 2024

I'd say try to get the event dispatcher and register a post-install-cmd/post-update-cmd listener that will do the needed work. You can't achieve this with promises here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants