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

fix(cli): support MSYS2 on Windows #1620

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Conversation

danielnaab
Copy link

Detect MSYS usage, in addition to cygwin, for Java classpath separators.

MSYS2 is pre-installed on Windows Github Action environments and is generally a lighter-weight alternative to cygwin.

For reference, the output of uname with MSYS looks like this:

$ uname
MSYS_NT-10.0-14393

danielnaab added a commit to 18F/fedramp-automation that referenced this pull request Apr 2, 2022
@danielnaab danielnaab changed the title Support MSYS2 on Windows fix(cli): Support MSYS2 on Windows Apr 2, 2022
danielnaab added a commit to 18F/fedramp-automation that referenced this pull request Apr 11, 2022
* Update vendor/oscal to v1.0.2 tag.

* Add workflow for running the Java and Python example tests.

* Remove Overmind devtools.

* Example don't require complete initialization - only submodules are
required, as all other dependencies are in the appropriate Dockerfiles.

* Build Schematron before running example tests.

* Run example tests on a matrix of [ubuntu, windows]. Follow-up: add a
separate Windows Dockerfile to test Python code on Windows.

* Turn off fail-fast, so the complete matrix will run despite failures.

* Use bash on all operating systems (pwsh is default on Windows).

* Test: remove BASE_DIR usage from validations module.mk, in attempt to
make paths work on Windows.

* Debugging

* Try adding separate container for Windows python tests.

* Run Python on Windows directly - rather than via make & docker.

* Turn on pytest verbose logging.

* Add note about msys2 usage for Windows users who may want to use the
Makefile.

* For Windows compatibility: pass local path arguments as file URIs.

* Update main test runner to run example tests on both Windows and Linux.

* Add Schematron build step to test runner.

* Don't suppress curl output/status code

* Add argument for curl to fail on 404

* Update xspec to use dnaab/support-msys. Temporary, until PR is merged: xspec/xspec#1620

* Local python script: use "python" vs "python3", so default Windows
install of Python 3 will work without change.

* Explicitly pass down SAXON_CP as environment var - appears to be
necessary on MSYS2.

* Remove Windows workflow for Python tests, in favor of running just the
Linux tests via the Makefile. Running the Python tests on Windows now
works, but is difficult to automate via Github actions.

* Remove platform attribute

* Java example container: linux/amd64

* For Python example, update Saxon/C version to 11.3. This includes code
changes due to an updated API interface.

* Remove Windows Dockerfile, for now - wait for better testing
opportunity.

* Run complete test suite on Linux; exclude the sample projects on
Windows, since they require Docker.

* Remove currently unnecessary Java example platform.

* Remove unused Windows Python make target

* Explicitly pass SAXON_CP var to compile-sch.sh, for the benefit of
Windows.

* Windows test: remove SAXON arg passing

* Test: remove another explicit SAXON env var passing

* Print installed version of node on errors

* Update documentation for Windows dependencies

* Format Python code with black

* Try using strip function for Windows compat problem

* Tweak error str

* Update package-lock.json

* Update to latest node.js LTS (16.14.2)

* Update error message

* Remove terminate on error message - this fixes a non-problematic path
mismatch on Windows.

* Update mkdirp package for windows compat

* Reorder help target so the default target is `help`.

* remove duplicate help target.
@AirQuick AirQuick added this to the v2.3 milestone Apr 18, 2022
@galtm galtm self-requested a review April 18, 2022 12:36
@galtm galtm changed the title fix(cli): Support MSYS2 on Windows fix(cli): support MSYS2 on Windows Apr 18, 2022
Copy link
Member

@galtm galtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good. Thanks for your contribution!

@galtm galtm merged commit 788b415 into xspec:master Apr 18, 2022
danielnaab added a commit to 18F/fedramp-automation that referenced this pull request May 9, 2022
Context: upstream has merged this fix for Windows users: xspec/xspec#1620
@AirQuick AirQuick mentioned this pull request Aug 27, 2023
16 tasks
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.

None yet

3 participants