Sitelet https://github.com/DragonBox/uplift/pull/92
Skip to content

Do not update dependencies when installing several dependencies at once - #92

Merged
niezbop merged 1 commit into
DragonBox:masterfrom
niezbop:fix/uplift_manager/do_not_check_dependencies_when_installing_several_packages
Nov 7, 2019
Merged

niezbop merged 1 commit into
DragonBox:masterfrom
niezbop:fix/uplift_manager/do_not_check_dependencies_when_installing_several_packages

Conversation

@niezbop

@niezbop niezbop commented Nov 6, 2019

Copy link
Copy Markdown
Member

When running UpliftManager.InstallPackages(), several (solved) packages are solved at once and then passed for installation. However if the package already exist, it updates it to the expected version.

The issue is that this update then try to update the package dependencies in cascade, updating packages which shouldn't be.

@niezbop niezbop added the bug label Nov 6, 2019
@niezbop
niezbop requested a review from lacostej November 6, 2019 12:33
@niezbop niezbop self-assigned this Nov 6, 2019
{
Debug.Log("update " + pr.Package.PackageName);
UpdatePackage(pr, updateLockfile: updateLockfile);
UpdatePackage(pr, updateDependencies: false, updateLockfile: updateLockfile);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So this wasn't a regression from #88.

Any chance we can have a unit test for this?

@niezbop niezbop Nov 6, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looks like it wasn't.

Any chance we can have a unit test for this?

On it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Turns out that's going to be super complicated to test. The package wasn't installed in the end, so the unit test would need to make sure that InstallPackage is not called with the problematic version, but we don't have clean separation of concerns which makes it hard to mock or inject.

@lacostej lacostej left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK for the lack of test. Thanks for trying!

@niezbop
niezbop merged commit 376b77f into DragonBox:master Nov 7, 2019
@niezbop
niezbop deleted the fix/uplift_manager/do_not_check_dependencies_when_installing_several_packages branch November 7, 2019 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants