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

Improve refreshing packages when manifest.json is newer than packages.json #2085

Merged
merged 3 commits into from
May 11, 2021

Conversation

citizenmatt
Copy link
Member

We want to update the list of packages when manifest.json and/or packages-lock.json is modified. We prefer packages-lock.json because it's more accurate. So if the user modifies manifest.json, we want to wait to allow Unity the chance to resolve packages and update the lock file.

This PR simplifies the existing code. If manifest.json is modified, it fires a longer event before refreshing, to allow Unity a chance to update. If Unity doesn't update, the event still fires and we work with manifest.json. If Unity does update, we cancel the long event and update with the more accurate packages-lock.json.

This fixes RIDER-62558 which hit an infinite loop in the old implementation, because if Unity isn't running, the file timestamps won't get updated.

@citizenmatt citizenmatt added this to the Rider 2021.2 milestone May 7, 2021
@citizenmatt citizenmatt self-assigned this May 7, 2021
@citizenmatt citizenmatt marked this pull request as ready for review May 11, 2021 09:50
@citizenmatt citizenmatt merged commit 38f8ce0 into net212 May 11, 2021
@citizenmatt citizenmatt deleted the net212-mte-refresh-packages branch May 11, 2021 10:47
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.

None yet

2 participants