Skip to content

Conversation

@JeanChristopheMorinPerso
Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Dec 31, 2025

Add a new setting called debug_shell_startup. When enabled, it logs information about the shell startup sequence.

This is kind of related to #2058. While helping on that issue, I noticed that it was hard the shell startup code was annoying to debug and more importantly, that part of rez doesn't have a lot of visibility. We don't visit that part very often. I thought that having some logs could help us and others better understand the general setup.

Here is how it looks on my machine:

$ REZ_DEBUG_SHELL_STARTUP=1 rez-env python
12:52:41 DEBUG    Writing context to /tmp/rez_context_cnmb7aaw/context.sh
12:52:41 DEBUG    Writing shell script to /tmp/rez_context_cnmb7aaw/.profile
12:52:41 DEBUG    Writing shell script to /tmp/rez_context_cnmb7aaw/.bash_profile
12:52:41 DEBUG    Writing shell script to /tmp/rez_context_cnmb7aaw/.bashrc
12:52:41 DEBUG    Setting $HOME for new shell to /tmp/rez_context_cnmb7aaw
12:52:41 DEBUG    Writing rez-shell to /tmp/rez_context_cnmb7aaw/rez-shell.sh
12:52:41 DEBUG    Launching shell with command: /usr/bin/bash /tmp/rez_context_cnmb7aaw/rez-shell.sh

You are now in a rez-configured environment.
...
...

…nformation about the shell startup sequence.

Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
@JeanChristopheMorinPerso JeanChristopheMorinPerso requested a review from a team as a code owner December 31, 2025 17:52
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 17.39130% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.94%. Comparing base (a0d2ddb) to head (a461bdc).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/rez/shells.py 11.11% 6 Missing and 2 partials ⚠️
src/rezplugins/shell/_utils/powershell_base.py 20.00% 2 Missing and 2 partials ⚠️
src/rezplugins/shell/cmd.py 20.00% 2 Missing and 2 partials ⚠️
src/rez/resolved_context.py 33.33% 1 Missing and 1 partial ⚠️
src/rez/rezconfig.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2059      +/-   ##
==========================================
- Coverage   59.99%   59.94%   -0.05%     
==========================================
  Files         163      163              
  Lines       20118    20139      +21     
  Branches     3519     3528       +9     
==========================================
+ Hits        12070    12073       +3     
- Misses       7227     7238      +11     
- Partials      821      828       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant