Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added appveyor config #339

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
1e09cde
Support to provide a rez release message using an editor.
Jan 29, 2016
ac245f9
-added pagke_repo pre_variant_install()
Jul 20, 2016
f0f6e4b
-more selective deletion of stale buildtagfiles (.buildVER)
Jul 21, 2016
b89dedc
-make package_filter config setting usable in package.py config overr…
Jul 21, 2016
21445a6
Added Travis CI integration
skral Aug 15, 2016
9e6088a
Added appveyor integration
skral Aug 15, 2016
192d57d
Fixes postfix prompt and cleans whitespace to be more controllable.
bfloch Sep 4, 2016
c61d1a7
build_process.local: _build_variant_base - if shutil.copy fails, try …
Mar 2, 2016
739ca77
hg: print log from most recent to oldest, so don't truncate current c…
Oct 19, 2016
b324456
add max_package_changelog_revisions config option
Oct 19, 2016
7da94e1
added option to force color output, even if not a tty
Nov 3, 2016
3d8364c
Added failgraph flag to rez-env
smaragden Nov 8, 2016
2d656f0
rex: don't let packages pollute namespace of future packages
Nov 8, 2016
007e966
allow configuration of truncate cap for shell error output
Nov 10, 2016
2a565fc
fix so that, even if there are no memcached servers, DoNotCache resul…
Nov 12, 2016
9b6e65f
fix for TestRelease.test_2_variant_add
Dec 8, 2016
9e8ca72
test_solver: corrected setting of config.packages_path
Dec 8, 2016
d915edb
create a set of standard build env vars
Dec 13, 2016
6d557b8
Merge branch 'issue_323'
Jan 4, 2017
a2eadce
Added pbs library for windows support (instead of sh). Updated sever…
Jan 13, 2017
425d632
invalidate memcache if a package file has been deleted / moved / etc
Jan 13, 2017
560e835
Updated windows cmd shell plugin and platform definition to correctly…
Jan 13, 2017
d381c02
Updated windows cmd shell plugin to correctly exit environment shell …
Jan 20, 2017
084d112
removed some print debugs
Jan 20, 2017
3ae805e
Merge branch 'master' of github.com:bpabel/rez
Jan 26, 2017
6451eaa
Avoid trying to create the .building file while running rez build. On…
Jan 27, 2017
7fc9d43
-added debugging help via USR1 signal
Feb 1, 2017
3ab23c3
Merge remote-tracking branch 'managani/master'
Feb 2, 2017
a3c7260
-added more configurable email recipient addresses on post release
Feb 3, 2017
8696fed
version up
Feb 3, 2017
43a8ae9
-added changelog to end of release notes file used if prompt_release_…
Feb 4, 2017
1924205
-added 'postprocess' attribute to package.py
Feb 7, 2017
f072313
-added package postprocessing;
Feb 14, 2017
7a94313
-WIP, late binding almost done
Feb 17, 2017
affe111
-first pass @late() support complete
Feb 21, 2017
a0c7683
-added 'num_loaded_packages' stat to contexts, see with rez-context -v
Feb 21, 2017
5712646
- postprocess -> preprocess, both are correct in different ways but p…
Feb 22, 2017
5531557
-added native support for expanding 'pkg-*' requirements lists
Feb 25, 2017
2a732f3
-minor update to give @early funcs access to pkg data;
Feb 25, 2017
dc47d9c
Merge remote-tracking branch 'luma/copy_or_replace'
Feb 28, 2017
936767e
-minor change, moved copy_and_replace() to rez.utils.filesystem
Feb 28, 2017
80c8ef6
-version up
Feb 28, 2017
e5644c8
Merge remote-tracking branch 'fnaum/master'
Feb 28, 2017
70ed6d1
-made 'context' optional in Solver, fixes some tests
Feb 28, 2017
8258507
-fixed most tests, one fail left
Feb 28, 2017
b4b4249
-fixed bug in merge of PR #354
Mar 1, 2017
7551f99
version up
Mar 1, 2017
31760f0
-added some tests for new package.py features
Mar 1, 2017
1aac3ee
-added testing for preprocessing, and build-time package.py code sharing
Mar 1, 2017
6cbdcc0
Merge remote-tracking branch 'luma/standard_build_env_vars'
Mar 2, 2017
88abec6
-added REZ_BUILD_REQUIRES envvar
Mar 2, 2017
a95d178
fixed broken tests
Mar 2, 2017
604ae7c
fixed bug from forgotten commenting
Mar 2, 2017
1a80900
rez-test WIP
Mar 3, 2017
3afad29
-imported modules in package.py now stripped from installed package.py
Mar 3, 2017
f57214e
-version up
Mar 3, 2017
4f2c285
-first pass rez-test support
Mar 4, 2017
27021aa
-added cli args
Mar 4, 2017
40d5bb2
Merge branch 'rez_test'
Mar 4, 2017
47257b4
version up
Mar 4, 2017
aa819e8
-'build_commands' support added
Mar 9, 2017
6c70da1
-misc fixes for new custom_build command
Mar 10, 2017
d1898eb
Merge remote-tracking branch 'luma/reverse_hg_changelog' into minor_p…
Mar 11, 2017
f1945a9
Merge remote-tracking branch 'luma/memcached_DoNotCache_fix' into min…
Mar 11, 2017
7005478
Merge remote-tracking branch 'luma/minor_fixes' into minor_pr_merges
Mar 11, 2017
9eb0d2e
Merge remote-tracking branch 'luma/release_variant_test' into minor_p…
Mar 11, 2017
c665c0a
Merge remote-tracking branch 'luma/moved_package_memcache_invalidate'…
Mar 11, 2017
728fbf9
Merge remote-tracking branch 'luma/max_revisions' into minor_pr_merges
Mar 11, 2017
a5c078b
Merge remote-tracking branch 'luma/config_error_truncate_cap' into mi…
Mar 11, 2017
3ab84a3
Merge remote-tracking branch 'luma/force_color' into minor_pr_merges
Mar 11, 2017
d5606da
version up
Mar 11, 2017
fe9d6f3
Merge remote-tracking branch 'luma/clean_executor_namespace'
Mar 11, 2017
8ab0d74
-added 'isolate' flag so we have more control over whether globals di…
Mar 11, 2017
0f8eb53
version up
Mar 11, 2017
8c5b818
minor docstring changes in rezconfig.py only.
Mar 11, 2017
74ec3e2
Fix/Enh: rez-env: allow shell from config file to take precedence ove…
Mar 14, 2017
996963f
Enh/Fix: forgotten executable bit ?
Mar 7, 2017
4a9f181
- reimplemented expand_requirement() to be more robust, allow any val…
Mar 18, 2017
19a22b9
-minor docstring fix
Mar 21, 2017
1500812
Add support for multiple paths in REZ_CONFIG_FILE. Paths are simply a…
instinct-vfx Mar 21, 2017
54959bf
-added new package orderers, unit test
Mar 24, 2017
bff2342
- Added check for spaces in absolute path for install.py. Without thi…
fxnut Mar 24, 2017
ba91e8e
-added reverse_sort_key to versions
Mar 25, 2017
22af7f6
-added requires_rez_version, format_version attributes
Mar 25, 2017
b582c03
-added package format specific format_version attrib
Mar 25, 2017
384b47c
-minor fix in build util code
Mar 25, 2017
acec3e2
allow yaml2py to take an explicit filename
Mar 23, 2017
1ca9f97
-added 'stop' rex command as official way for package commands to fail
Apr 1, 2017
0ed0a0b
-fixed infinite recursion bug when package_load_callback specified in…
Apr 1, 2017
b99717a
version up
Apr 1, 2017
8ad7202
Update shotgun toolkit hook with local changes
Apr 5, 2017
623a0f6
compatibility fix for newer versions of git
Apr 19, 2017
3b9a2e1
Merge branch 'master' of https://github.com/nerdvegas/rez
May 11, 2017
486b3f7
moved git ignore to global ignore
Jun 20, 2017
9012bce
added newline
Jun 20, 2017
b70b423
fix apply function so the enviornment variables are available after a…
Jul 4, 2017
d9e83b8
-minor update to apply() fix
Jul 4, 2017
1da4887
-fixed bug where parent_environ was not being set into the target env…
Jul 4, 2017
f70013d
-added test for environ in execute_command
Jul 4, 2017
8a89487
Implements #442 - Adds build_requires and private_build_requires opti…
Jul 12, 2017
b33c924
solver fix for variant splitting
Aug 1, 2017
d4e5ed0
wip doc updates
Sep 29, 2017
b3575e9
docs wip
Sep 30, 2017
dc56cba
wip docs
Sep 30, 2017
18f1bbd
wip docs
Sep 30, 2017
ac248bb
-fixed bug in solver (YES)
Oct 3, 2017
19eaa72
-minor optimisation in version code
Oct 3, 2017
7256168
-added stats gathering to solver
Oct 4, 2017
1541403
-fixed unbelievably simple bug in RequirementList
Oct 4, 2017
7e19866
Merge pull request #457 from nerdvegas/better_solver_debugging_output
nerdvegas Oct 4, 2017
232d172
-added test which catches failure described in issue #458
Oct 4, 2017
f8c312e
-fixed orderer bug and added test
Oct 4, 2017
7934591
Merge remote-tracking branch 'remotes/upstream/master' into feat/add-…
instinct-vfx Oct 5, 2017
4585f26
Implementing tag_exists for hg.
Oct 12, 2017
7a5ef97
Merge branch 'master' of https://github.com/nerdvegas/rez
Nov 21, 2017
aacd775
Rolled back accidental studio-specific changes to example file.
Nov 27, 2017
37acf74
Removed sh and pbs import for git plugin.
Nov 27, 2017
f2e0db0
Merge remote-tracking branch 'luma/variant_split_fix'
Nov 28, 2017
cf615c9
version up
Nov 28, 2017
94286df
Merge remote-tracking branch 'toonbox/issue_hg_tag_exists'
Nov 28, 2017
8533a69
version up
Nov 28, 2017
1024712
Merge remote-tracking branch 'luma/git_new_version_fix'
Nov 28, 2017
c7c16f9
Merge remote-tracking branch 'luma/yaml2py_explicit_filename'
Nov 28, 2017
5dfc879
Merge remote-tracking branch 'fxnut/issue_401'
Nov 28, 2017
3b498ec
Merge remote-tracking branch 'gst/fix_missed_exec_bit'
Nov 28, 2017
7400c9a
Merge remote-tracking branch 'piratecrew/failgraph'
Nov 28, 2017
982b7fc
Merge remote-tracking branch 'provisualx/master'
Nov 28, 2017
2e1a874
Removed sh and pbs dependency in release_hook. Deleted sh and pbs fr…
Nov 28, 2017
4214c30
Merge remote-tracking branch 'pixomondo/upstream_travis-ci'
Nov 28, 2017
a7a520a
testing travis
Nov 28, 2017
b10cb5a
added travis badge to README
Nov 28, 2017
492f920
travis testing
Nov 28, 2017
17e2ac8
travis testing
Nov 28, 2017
e9a0092
fixed travis yaml syntax err
Nov 28, 2017
54b6fdd
testing travis
Nov 28, 2017
dceb56b
Merge branch 'master' of https://github.com/nerdvegas/rez
Nov 28, 2017
efb1c3d
Updated tests to use subprocess instead of sh not that sh is removed
Nov 28, 2017
5510f29
-added subprocess.Popen wrapper
Nov 29, 2017
067c684
misc bugs
Nov 29, 2017
27c15d3
Merge remote-tracking branch 'gst/fix_395_rez_env_and_rez_config_file…
Nov 29, 2017
91f4ea8
added WIKI.md
Nov 29, 2017
36d78e6
added wiki update script
Nov 29, 2017
a3b7947
update wiki update script
Dec 6, 2017
143cf66
-removed wiki gen script, moved to rez-wiki repo
Dec 13, 2017
8ca303d
Merge remote-tracking branch 'toonbox/issue_442'
Dec 13, 2017
d803816
-merged PR, minor changes
Dec 13, 2017
e67f895
dumb change to trigger travis
Jan 9, 2018
a661ac7
-temp rollback to prev travis build env - new env might be using cmak…
Jan 9, 2018
9beb0fb
-removed code to support install of empty (no build) pkgs
Jan 9, 2018
9b61a3b
version up
Jan 9, 2018
4bc4052
see if this fixes travis build fail
Jan 9, 2018
b211b4a
-cmake change appears to fix travis build fail
Jan 9, 2018
5bb9465
Merge remote-tracking branch 'instinct/feat/add-support-for-multiple-…
Jan 9, 2018
77635b4
-added config setting list modification feature
Jan 10, 2018
ebe18cb
version up
Jan 10, 2018
54a7d41
-added wiki contents to rez repo
Jan 17, 2018
21187ef
Added appveyor integration
skral Aug 15, 2016
56a06b7
Merge branch 'upstream_appveyor' of github.com:Pixomondo/rez into ups…
Mar 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dist/
*~
docs/_build
.DS_Store
.rez-gen-wiki-tmp
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: python

matrix:
include:
- python: 2.7
os: linux
env: _REZ_SHELL=bash

install:
- 'if [ "$_REZ_SHELL" == "tcsh" ]; then sudo apt-get install tcsh; fi'
- 'python ./install.py ../rez_install'

script:
- '../rez_install/bin/rez/rez-selftest -s $_REZ_SHELL'
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ sending a pull request. Please follow these guidelines:
* Follow [PEP8](https://www.python.org/dev/peps/pep-0008/);
* Follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
for docstrings;
* Use *spaces*, not *tabs*.
* Use *spaces*, not *tabs*;
* Add relevant tests to demonstrate that your changes work;
* Add relevant documentation (see *wiki* source directory) to document your changes, if applicable.

## Reporting Bugs

If you report a bug, please ensure to specify the following:

* Rez version (e.g. 2.0.rc1.35);
* Rez version (e.g. 2.18.0);
* Platform and operating system you were using;
* Contextual information (what were you trying to do using Rez);
* Simplest possible steps to reproduce.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/nerdvegas/rez.svg?branch=master)](https://travis-ci.org/nerdvegas/rez)

![logo](media/rez_banner_256.png)

- [What Is Rez?](#what-is-rez)
Expand Down
17 changes: 17 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
environment:
matrix:
# For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python
# The list here is complete (excluding Python 2.6, which
# isn't covered by this document) at the time of writing.
- PYTHON: "C:\\Python27-x64"

install:
# Install rez
- "%PYTHON%\\python.exe install.py temp"

build: off

test_script:
# Run rez selftest
- "C:\\projects\\rez\\temp\\Scripts\\rez\\rez.exe selftest"
Empty file modified bin/rez-diff
100644 → 100755
Empty file.
Empty file modified bin/rez-pip
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions bin/rez-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env python
from rez.cli._main import run
run("test")
7 changes: 6 additions & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _get_script_text(self, entry):
def patch_rez_binaries(dest_dir):
bin_names = os.listdir(bin_path)
_, _, _, venv_bin_path = path_locations(dest_dir)
venv_py_executable = which("python", env={"PATH":venv_bin_path,
venv_py_executable = which("python", env={"PATH":venv_bin_path,
"PATHEXT":os.environ.get("PATHEXT", "")})

# delete rez bin files written by setuptools
Expand Down Expand Up @@ -114,6 +114,11 @@ def copy_completion_scripts(dest_dir):
"ie, the baked script locations may still contain symlinks")
opts, args = parser.parse_args()

if " " in os.path.realpath(__file__):
err_str = "\nThe absolute path of install.py cannot contain spaces due to setuptools limitation.\n" \
"Please move installation files to another location or rename offending folder(s).\n"
parser.error(err_str)

# determine install path
if len(args) != 1:
parser.error("expected DEST_DIR")
Expand Down
2 changes: 1 addition & 1 deletion push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ $? -ne 0 ]; then
fi

# tag version
version=$(cat src/rez/utils/_version.py | grep -w _rez_version | tr '"' ' ' | awk '{print $NF}')
version=$(cat src/rez/utils/_version.py | grep -w _rez_version | head -n1 | tr '"' ' ' | awk '{print $NF}')
echo "tagging ${version}..."
git tag $version
if [ $? -ne 0 ]; then
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ def find_files(pattern, path=None, root="rez"):
'rez':
['rezconfig', 'utils/logging.conf'] +
['README*'] +
find_files('*.*', 'completion') +
find_files('*.*', 'tests/data'),
find_files('*', 'completion') +
find_files('*', 'tests/data'),
'rezplugins':
find_files('rezconfig', root='rezplugins') +
find_files('*.cmake', 'build_system', root='rezplugins') +
find_files('*.*', 'build_system/template_files', root='rezplugins'),
find_files('*', 'build_system/template_files', root='rezplugins'),
'rezgui':
find_files('rezguiconfig', root='rezgui') +
find_files('*.*', 'icons', root='rezgui')
find_files('*', 'icons', root='rezgui')
},
classifiers = [
"Development Status :: 4 - Beta",
Expand Down
252 changes: 252 additions & 0 deletions src/rez/SOLVER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
# Description Of Solver Algorithm

## Overview

* A **phase** is a current state of the solve. It contains a list of **scopes**.
* A **scope** is a package request. If the request isn't a conflict, then a scope
also contains the actual list of variants that match the request.

The solve loop performs 5 different types of operations:

* **EXTRACT**. This happens when a common dependency is found in all the variants
in a scope. For example if every version of pkg 'foo' depends on some version
of python, the 'extracted' dependency might be "python-2.6|2.7".

* **MERGE-EXTRACTIONS**. When one or more scopes are successfully *extracted*,
this results in a list of package requests. This list is then merged into a new
list, which may be unchanged, or simpler, or may cause a conflict. If a conflict
occurs then the phase is in conflict, and fails.

* **INTERSECT**: This happens when an extracted dependency overlaps with an existing
scope. For example "python-2" might be a current scope. Pkg foo's common dependency
python-2.6|2.7 would be 'intersected' with this scope. This might result in a
conflict, which would cause the whole phase to fail (and possibly the whole solve).
Or, as in this case, it narrows an existing scope to 'python-2.6|2.7'.

* **ADD**: This happens when an extraction is a new pkg request. A new scope is
created and added to the current list of scopes.

* **REDUCE**: This is when a scope iterates over all of its variants and removes those
that conflict with another scope. If this removes all the variants in the scope,
the phase has failed - this is called a "total reduction". This type of failure
is not common - usually it's a conflicting INTERSECT that causes a failure.

* **SPLIT**: Once a phase has been extracted/intersected/added/reduced as much as
possible (this is called 'exhausted'), we are left with either a solution (each
scope contains only a single variant), or an unsolved phase. This is when the
algorithm needs to recurse (although it doesn't actually recurse, it uses a stack
instead). A SPLIT occurs at this point. The first scope with more than one
variant is found. This scope is split in two (let us say ScopeA and ScopeB),
where ScopeA has at least one common dependency (worst case scenario, ScopeA
contains a single variant). This is done because it guarantees a later extraction,
which hopefully gets us closer to a solution. Now, two phases are created (let us
say PhaseA and PhaseB) - identical to the current phase, except that PhaseA has
ScopeA instead of the original, and PhaseB has ScopeB instead of the original.
Now, we attempt to solve PhaseA, and if that fails, we attempt to solve PhaseB.

Following the process above, we maintain a 'phase stack'. We run a loop, and in
each loop, we attempt to solve the phase at the top of the stack. If the phase
becomes exhaused, then it is split, and replaced with 2 phases (so the stack
grows by 1). If the phase is solved, then we have the solution, and the other
phases are discarded. If the phase fails to solve, then it is removed from the
stack - if the stack is then empty, then there is no solution.

## Pseudocode

The pseudocode for a solve looks like this (and yes, you will have to read the
solver code for full appreciation of what's going on here):

def solve(requests):
phase = create_initial_phase(requests)
phase_stack = stack()
phase_stack.push(phase)

while not solved():
phase = phase_stack.pop()

if phase.failed:
phase = phase_stack.pop() # discard previous failed phase

if phase.exhausted:
phase, next_phase = phase.split()
phase_stack.push(next_phase)

new_phase = solve_phase(phase)

if new_phase.failed:
phase_stack.push(new_phase) # we keep last fail on the stack
elif new_phase.solved:
# some housekeeping here, like checking for cycles
final_phase = finalise_phase(new_phase)
phase_stack.push(final_phase)
else:
phase_stack.push(new_phase) # phase is exhausted

def solve_phase(phase):
while True:
changed_scopes = []
added_scopes = []
widened_scopes = []

while True:
extractions = []

foreach phase.scope as scope:
extractions |= collect_extractions(scope)

if not extractions:
break

merge(extractions)
if in_conflict(extractions):
set_fail()
return

foreach phase.scope as scope:
intersect(scope, extractions)

if failed(scope):
set_fail()
return

if was_intersected(scope):
changed_scopes.add(scope)

if was_widened(scope):
widened_scopes.add(scope)

# get those extractions involving new packages
new_extractions = get_new_extractions(extractions)

# add them as new scopes
foreach request in new_extractions:
scope = new_scope(request)
added_scopes.add(scope)
phase.add(scope)

if no (changed_scopes or added_scopes or widened_scopes):
break

pending_reductions = convert_to_reduction_set(
changed_scopes, added_scopes, widened_scopes)

while pending_reductions:
scope_a, scope_b = pending_reductions.pop()
scope_a.reduce_by(scope_b)

if totally_reduced(scope_a):
set_fail()
return

# scope_a changed so other scopes need to reduce against it again
if was_reduced(scope_a):
foreach phase.scope as scope:
if scope is not scope_a:
pending_reductions.add(scope, scope_a)

There are 2 notable points missing from the pseudocode, related to optimisations:

* Scopes keep a set of package families so that they can quickly skip unnecessary
reductions. For example, all 'foo' pkgs may depend only on the set (python, bah),
so when reduced against 'maya', this becomes basically a no-op.

* Objects in the solver (phases, scopes etc) are immutable. Whenever a change
occurs - such as a scope being narrowed as a result of an intersect - what
actually happens is that a new object is created, often based on a shallow copy
of the previous object. This is basically implementing copy-on-demand - lots of
scopes are shared between phases in the stack, if objects were not immutable
then creating a new phase would involve a deep copy of the entire state of the
solver.

## Interpreting Debugging Output

Solver debugging is enabled using the *rez-env* *-v* flag. Repeat for more
vebosity, to a max of *-vvv*.

### Scope Syntax

Before describing all the sections of output during a solve, we need to explain
the scope syntax. This describes the state of a scope, and you'll see it a lot
in solver output.

* `[foo==1.2.0]` This is a scope containing exactly one variant. In this case it
is a *null* variant (a package that has no variants).

* `[foo-1.2.0[1]]` This is a scope containing exactly one variant. This example
shows the 1-index variant of the package foo-1.2.0

* `[foo-1.2.0[0,1]]` This is a scope containing two variants from one package version.

* `foo[1.2.0..1.3.5(6)]` This is a scope containing 6 variants from 6 different
package versions, where the packages are all >= 1.2.0 and <= 1.3.5.

* `foo[1.2.0..1.3.5(6:8)]` This is a scope containing 8 variants from 6 different
package versions.

In all of the above cases, you may see a trailing `*`, eg `[foo-1.2.0[0,1]]*`.
This indicates that there are still outstanding *extractions* for this scope.

### Output Steps

request: foo-1.2 bah-3 ~foo-1

You will see this once, at the start of the solve. It simply prints the initial
request list.

merged request: foo-1.2 bah-3

You will see this once and immediately after the `request:` output. It shows a
simplified (merged) version of the initial request. Notice here how `~foo-1` is
gone - this is because the intersection of `foo-1.2` and `~foo-1` is simply
`foo-1.2`.

pushed {0,0}: [foo==1.2.0[0,1]]* bah[3.0.5..3.4.0(6)]*

This is pushing the initial *phase* onto the *phase stack*. The `{0,0}` means
that:

* There is 1 phase in the stack (this is the zeroeth phase - phases are pushed
and popped from the bottom of the stack);
* Zero other phases have already been solved (or failed) at this depth so far.

--------------------------------------------------------------------------------
SOLVE #1...
--------------------------------------------------------------------------------

This output indicates that a phase is starting. The number indicates the number
of phases that have been solved so far (1-indexed), regardless of how many have
failed or succeeded.

popped {0,0}: [foo==1.2.0[0,1]]* bah[3.0.5..3.4.0(6)]*

This is always the first thing you see after the `SOLVE #1...` output. The
topmost phase is being retrieved from the phase stack.

EXTRACTING:
extracted python-2 from [foo==1.2.0[0,1]]*
extracted utils-1.2+ from bah[3.0.5..3.4.0(6)]*

This lists extractions that have occurred from current scopes.

MERGE-EXTRACTIONS:
merged extractions are: python-2 utils-1.2+

This shows the result of merging a set of extracted package requests into a
potentially simpler (or conflicting) set of requests.

INTERSECTING:
python[2.7.3..3.3.0(3)] was intersected to [python==2.7.3] by range '2'

This shows scopes that were intersected by previous extractions.

ADDING:
added utils[1.2.0..5.2.0(12:14)]*

This shows scopes that were added for new extractions (ie, extractions that
introduce a new package into the solve).

REDUCING:
removed blah-35.0.2[1] (dep(python-3.6) <--!--> python==2.7.3)
[blah==35.0.2[0,1]] was reduced to [blah==35.0.2[0]]* by python==2.7.3

This shows any reductions and the scopes that have changed as a result.
17 changes: 17 additions & 0 deletions src/rez/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@
logging.config.fileConfig(logging_conf_file, disable_existing_loggers=False)


# actions registered on SIGUSR1
action = os.getenv("REZ_SIGUSR1_ACTION")
if action:
import signal, traceback

if action == "print_stack":
def callback(sig, frame):
txt = ''.join(traceback.format_stack(frame))
print
print txt
else:
callback = None

if callback:
signal.signal(signal.SIGUSR1, callback) # Register handler


# Copyright 2013-2016 Allan Johns.
#
# This library is free software: you can redistribute it and/or
Expand Down
Loading