rez icon indicating copy to clipboard operation
rez copied to clipboard

Rez Suites load implicit packages from context

Open beatreichenbach opened this issue 1 year ago • 0 comments

Rez Suites load implicit packages from the context that they were set up in.

Environment

  • OS: linux rocky 8.7
  • Rez version: 2.113.0
  • Rez python version: Python 3.11.2

To Reproduce

  1. rez-suite --create mysuite
  2. rez-env maya-2016.2 --output maya.rxt
  3. Pretend this was done on a different OS by editing maya.rxt and changing an implicit package.
  4. rez-suite --add maya.rxt --context maya mysuite
  5. ./mysuite/bin/maya +i

Expected behavior I would expect the suite to load the implicit packages of it's own context.

Actual behavior The suite loads the implicit packages of the context.

Possible Solutions

  1. rez-env --output should not output implicit packages. This will only work on newly created contexts and won't fix existing suites.
  2. rez-suite --add should strip implicit packages. This will only work on newly created suites and won't fix existing suites.
  3. _FWD__invoke_suite_tool_alias removes implicit packages. This might fix the problem with suites but might not fix other issues as it's such a targeted fix.
  4. ResolvedContext.from_dict doesn't load implicit packages. This fixes the underlying issue but might lead to issues if the user would require a truly frozen context.

beatreichenbach avatar Nov 16 '23 19:11 beatreichenbach