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

Prevent unnecessary composer package downloads #4635

Conversation

driskell
Copy link
Contributor

@driskell driskell commented Jan 15, 2022

This PR prevents all installations of packages during composer updates. It significantly increases speed of updates.

This was discussed in #2999 and should help greatly with #2416.

Previous PR was #2998 and I closed it as I thought there was issues with this approach, as https://github.com/wikimedia/composer-merge-plugin stopped working. After rechecking with existing dependabot-core main branch I did see setScripts is false already and was able to reproduce the merge-plugin issue there. Having thought about it I think it's unreasonable to support that plugin in dependabot - even if the packages merged in weren't removed there would still be incompatibility in that packages merged in won't get dependabot updates. So I've produced this PR again as it was for discussion.

Credit should also go to @jurre here as it's a progression from #3009.

Copy link
Contributor

@feelepxyz feelepxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work on this! 🎉 I think this looks good, will give it a quick QA test locally to verify.

Thanks for updating the tests, not raising for these cases is a real nice improvement.

@jurre
Copy link
Member

jurre commented Jan 26, 2022

This seems very promising, thanks @driskell 🎉

@feelepxyz do you need a hand w/ QAing?

Copy link
Contributor

@feelepxyz feelepxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this out a few test repos and working nicely! Double win here, speeding up composer v2 updates and removing a class of update errors where downloads needed authentication 🎉

This is in line with other package managers so great to see this working in composer now.

@feelepxyz feelepxyz merged commit cb21721 into dependabot:main Jan 27, 2022
@feelepxyz feelepxyz mentioned this pull request Jan 27, 2022
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