AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
939 stars 332 forks source link

Rez Suites load implicit packages from context #1587

Open beatreichenbach opened 10 months ago

beatreichenbach commented 10 months ago

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

Environment

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.