AcademySoftwareFoundation / AcademySoftwareFoundation/rez

build_command evaluates too early

Open
#1,085 0 comments 1 reaction 0 assignees View on GitHub
bug rez-build
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.