AcademySoftwareFoundation / AcademySoftwareFoundation/rez
build_command evaluates too early
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 374
- Avg merge
- 9d 12h
- Merged PRs (30d)
- 5
Description
The following fails, but should not:
```
def pre_build_commands():
env.FOO = 'bah'
build_command ="python {root}/${FOO}.py"
```
It should also be possible to early-bind build_command, but if this is done, objects such as `resolve` are not available. This means it isn't possible to have a variant-specific build_command.
build_command evaluation should be delayed until as late as possible, so the above is supported.
Contributor guide
Research direction
Start by tracing where build_command is evaluated relative to pre_build_commands and variant resolution, including the availability of resolve for early binding. Verify the behavior using the provided Python example. Done means environment assignments are honored by default while variant-specific build_command values can still access resolve when needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100