Fix `package_cache_async` missing from `ResolvedContext` dict round-trip
This is a follow-up fix to https://github.com/AcademySoftwareFoundation/rez/pull/1679
The new package_cache_async attribute on the ResolvedContext class was not being round-tripped through the context serialization process. This leads to the following error after spawning a shell (when the rezolve context command runs):
17:44:39 ERROR ResolvedContextError: Failed to load context from S:\Temp\rez_context_gsab2kwu\context.rxt: AttributeError: 'ResolvedContext' object has no attribute 'package_cache_async'
I will note that it seems a bit strange for ResolvedContext.from_dict to call context._update_package_cache() after creating a new instance, but I assume there are some historical reasons for this. However, given this pattern, if package_cache_async is set to False, from_dict could potentially block for a very long time.
CC @isohedronpipeline for visibility.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 58.52%. Comparing base (
3d0f224) to head (fd541f5). Report is 37 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1810 +/- ##
=======================================
Coverage 58.52% 58.52%
=======================================
Files 126 126
Lines 17206 17207 +1
Branches 3519 3519
=======================================
+ Hits 10069 10070 +1
Misses 6468 6468
Partials 669 669
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.