-
Notifications
You must be signed in to change notification settings - Fork 337
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
Windows Gitbash Support Fixes #1302 #1475
Open
Jawabiscuit
wants to merge
124
commits into
AcademySoftwareFoundation:main
Choose a base branch
from
Jawabiscuit:fixes_#1302
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
9f0d5ee
Add pathing options to shells
amorphousWaste bfc99e2
Add pathing options for cmd
amorphousWaste 8eb7f5a
Add pathing options to gitbash
amorphousWaste 7d66f00
Add slash expansion
amorphousWaste 1e1d4b2
Conform drive start letters
amorphousWaste ff7a11c
Quote executable
amorphousWaste 0ce60ab
Use new pathing option for shell paths
amorphousWaste a91a4c5
Add pathing options to rex
amorphousWaste f3e2b68
Use new path option
amorphousWaste 744e8f9
Add shell_pathed_env_vars to config
amorphousWaste 7aaaecb
Add classmethod to check for shell pathed keys
amorphousWaste 640e44c
Add is_shell_path arg to escape_string
amorphousWaste c55ee1b
Add is_shell_path arg to escape_string overrides
amorphousWaste a9d4de5
Update call to escape_string with is_shell_path arg
amorphousWaste 7057632
Capitalize drive letter on windows path conversion
amorphousWaste 2a51e0c
Fix docstring
amorphousWaste 7f20c9e
Change "cygwin" to "cygpath"
amorphousWaste e37e7f2
Change "cygwin" to "cygpath"
amorphousWaste bb3bb0d
Fix call
amorphousWaste 51d9af0
Add description to shell_pathed_env_vars
amorphousWaste e997c9e
Add convert_path wrapper
amorphousWaste f9607b5
Update to_posix_path
amorphousWaste 6834fb2
Update to_windows_path
amorphousWaste 1e5b3f2
Use new convert_path function
amorphousWaste 4976105
Replace as_shell_path with as_path
amorphousWaste e12ef77
Add to_windows_path function
amorphousWaste af69b8d
Revert erroneous change
amorphousWaste 489b7bc
Swap if statement for better readability
amorphousWaste 0b5594c
Update normalize_paths replacement
amorphousWaste c7e7454
Correct capitalization
amorphousWaste 42e37f9
Change `as_shell_path` with `as_path`
amorphousWaste 267c3e3
Update implicit package value expansion
amorphousWaste 9d0bdde
Add special regex for mixed drive letters
amorphousWaste db30108
Fix path slashes
amorphousWaste 688337a
Conform strings
amorphousWaste 3b6b3c5
Fix path conversions
amorphousWaste a92bdc6
Add special logic for implicit keys and values
amorphousWaste 3683a78
Merge with 2.112.0 changes
amorphousWaste 3f3ed75
Add disable_normalization flag to config
amorphousWaste b3a76f5
Add disable normalization test
amorphousWaste 3d5d5bb
Create shell utils tests
amorphousWaste cd97e30
Add logic for skipping path normalization
amorphousWaste d828b2e
Add debugging output to path conversion
amorphousWaste 8d79945
Add beginnings of e2e shell tests
Jawabiscuit ff5c1f5
Make copyright checker happy
Jawabiscuit 9ee6346
Make linter happy
Jawabiscuit f5e9b7a
Set root loglevel to INFO
Jawabiscuit a9aeb94
Consolidate logging messages into shell normalization processes
Jawabiscuit 9fa4af6
Remove unused imports
Jawabiscuit c13efbd
Fix Linux unittest
Jawabiscuit 8a2040c
Fix unicode decode error
Jawabiscuit a8f2f7d
Fix rez selftest error on ubuntu using bash
Jawabiscuit 5a62599
Remove commented code
Jawabiscuit af4365d
Remove debug code
Jawabiscuit 9bde403
Fix bash.exe for gitbash not being found
Jawabiscuit f7f06b1
Revert sourcecode.py
Jawabiscuit ee0e0bd
Back to normalizing slash to backslash in cmd and powershell
Jawabiscuit ff743db
Revert log level to debug
Jawabiscuit 0ec2eed
Configurable shell logging
Jawabiscuit 0ef8df0
Fix rez bind python-2 on Windows
Jawabiscuit 0186176
Rename disable_normalization -> enable_path_normalization
Jawabiscuit d894bb3
Formatting and cleaning up diffs w/ master
Jawabiscuit c3e6ce5
Temporary fix for normalizing PYTHONPATH
Jawabiscuit 685ff34
Add shell_pathed_env_vars setting
Jawabiscuit e3df9b6
Implement shell env var sep settings
Jawabiscuit 41e3aa3
Remove wildcard from pathed env vars setting
Jawabiscuit 3ddcfd7
Change function signature
Jawabiscuit b119326
Extend cygpath convert to handle more scenarios
Jawabiscuit c8463ff
Refactor to remove unnecessary force fwd slashes
Jawabiscuit d5510de
Refactor cygpath to posix path
Jawabiscuit 332a19f
Platform dependent test decorator
Jawabiscuit 75a904a
Remove to windows path conversion
Jawabiscuit d05e752
Refactor cygpath to mixed path
Jawabiscuit 519c462
Extend functionality of posix and mixed path conversion
Jawabiscuit 89fa4ac
Backwards compat unittest regex assertions
Jawabiscuit 5fab1ce
More UNC path handling and unittests
Jawabiscuit 5a28572
Revert gitbash.py style changes
Jawabiscuit 4213333
Extend rez bind hello_world for unittests and cli
Jawabiscuit 1c54516
Use single quotes to format executable
Jawabiscuit cfd8846
Keep unittests DRY, override `default_shell` in test decorator
Jawabiscuit 32cb146
Fix rez suites test
Jawabiscuit a34dc14
Fix typo
Jawabiscuit d6d0efe
Add more e2e shell tests
Jawabiscuit 08b77e9
Use shell startup setting to enable warnings or errors
Jawabiscuit 6fcf1d1
Skip parts of tests in certain shells in CI for now
Jawabiscuit 4c5f1ec
Handle relative paths more gracefully
Jawabiscuit 2b83e8b
Enable use of a small list of included shells per test
Jawabiscuit fbc6e7f
Reinstate wildcard pathed env vars setting
Jawabiscuit 574190d
Test root path normalization
Jawabiscuit c16568a
Test path convert with empty paths as is the case with variant subpaths
Jawabiscuit 143cbad
Fixup diff with master
Jawabiscuit c01d569
Enable path normalization and default shell consistency
Jawabiscuit 5c9b251
Drive letter case consistency with canonical paths
Jawabiscuit 2599cbf
Handle `~` string expansion on windows
Jawabiscuit 0c8380b
Use cygpath convert in GitBash normalize_paths
Jawabiscuit 38a6211
Per available shell tests consistency
Jawabiscuit 89b5119
Remove debugging artifact
Jawabiscuit d851bea
Remove check for implicit paths in string escape
Jawabiscuit 04a8673
Inline documentation
Jawabiscuit de40018
Make linter happy
Jawabiscuit ce42276
Workaround CI test error in certain shells.
Jawabiscuit 626cbc6
Tweaking rezconfig documentation
Jawabiscuit 38ab2e5
Fix character encoding error
Jawabiscuit 595c9e8
Do not raise an error if converting an unmapped UNC path
Jawabiscuit 07c762a
Cleanup unnecessary per available shell config override
Jawabiscuit 4fe7417
Add cmake module path default config and e2e test for gitbash
Jawabiscuit a36adcc
Fix UNC path expansion for custom builds
Jawabiscuit 63d1fe6
Normalize paths used in cmake build command
Jawabiscuit f5920fc
Fix python env path prepends in gitbash
Jawabiscuit c2cac0e
Change CI detection
Jawabiscuit 049070b
Per shell config overrides are handled by test decorator
Jawabiscuit 868cfde
Newer versions of chocolatey & .NET 4.8 require restart
Jawabiscuit ee46d3c
Env var seps weren't actually being overridden here
Jawabiscuit 9d55dec
Consolidate and make more meaningful e2e shell tests
Jawabiscuit 544272a
Remove extra import
Jawabiscuit 3da8f11
Address sonarcube bug and code smells
Jawabiscuit ac3ff37
This partially addresses #1321 because it only fixes the issue in cmd…
Jawabiscuit d0958cd
Add cmake build test and path normalization test for Windows
Jawabiscuit 76cb8cb
Address cmake build failures on Windows in powershell and pwsh
Jawabiscuit c6fc1da
Fix e2e test for py ver < 3.3
Jawabiscuit ae11f37
Add Sphinx syntax where appropriate
Jawabiscuit 3ff62e9
Enforce consistency between *pendenv methods
Jawabiscuit 25665f5
Merge branch 'main' into fixes_#1302
JeanChristopheMorinPerso 1778f57
Fix test_shells after merge
JeanChristopheMorinPerso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/rez/data/tests/builds/packages/winning/9.6/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
# On Linux defining a project name is usually not necessary for rez packages which simply use cmake | ||
# as a Makefile recipe generator, however to be cross-compatible with Windows we can define it to | ||
# get the same functionality. | ||
# | ||
# Here we are telling cmake this is not a compiled project by providing NONE for the second argument. | ||
# | ||
# The project function is only being used in this in case because we are on Windows and want to use | ||
# the gnu make utility provided by a `make` rez package or configuring a path to `make.exe` in rez config. | ||
# This bypasses having to use the default `nmake` on Windows which requires the Windows compiler and | ||
# linker and attempts to build a simple c++ executable during a build. | ||
# | ||
project($ENV{REZ_BUILD_PROJECT_NAME}, NONE) | ||
|
||
include(RezBuild) | ||
|
||
file(GLOB_RECURSE py_files "python/*.py") | ||
|
||
# Not using rez_install_python b/c we don't want to require python for this test package | ||
rez_install_files( | ||
${py_files} | ||
DESTINATION . | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name = "winning" | ||
version = "9.6" | ||
description = ( | ||
"Test cmake builds especially on Windows with Unix Makefiles generator. " | ||
"This is a handy workflow to have on Windows b/c it supports rez + cmake with " | ||
"minimal effort and w/o the overhead of Visual Studio. " | ||
"Note: Using cmake on Windows requires path normalization to be enabled. " | ||
) | ||
|
||
build_requires = [ | ||
# make and cmake need to be installed locally for this test to build and succeed | ||
] | ||
|
||
def commands(): | ||
env.PYTHONPATH.append("{root}/python") |
1 change: 1 addition & 0 deletions
1
src/rez/data/tests/builds/packages/winning/9.6/python/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file is intentionally left blank |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# pyright: reportUndefinedVariable=false | ||
name = "shell" | ||
|
||
version = "1.0.0" | ||
|
||
|
||
def commands(): | ||
import os | ||
|
||
env.PATH.append("{root}") | ||
env.PYTHONPATH.append(os.path.join("{root}", "src")) | ||
env.PYTHONPATH.append(os.path.join("{root}", "python")) | ||
env.CMAKE_MODULE_PATH.append(os.path.join(this.root, "foo.cmake")) | ||
env.CMAKE_MODULE_PATH.append(os.path.join(this.root, "bar.cmake")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe env_vars_to_convert or something like that?