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 psc-package-clean and test cleanup on Windows #224

Merged
merged 2 commits into from
May 30, 2019

Conversation

stkb
Copy link
Contributor

@stkb stkb commented May 30, 2019

Description of the change

Replaces use of Turtle.rmtree with System.Directory.removePathForcibly to fix the following issues on Windows.

spago psc-package-clean (and its test) fail because:

  1. Git marks files under its /objects subdirectory as read-only
  2. Turtle.rmtree fails to delete files marked as read-only

So rmtree fails to remove any folder that's a git repository.

As well as psc-package-clean, general test cleanup fails, meaning the test suite will fail completely when run for the second time.

Checklist:

  • Added the change to the "Unreleased" section of the changelog

stkb added 2 commits May 30, 2019 16:12
Replaces use of `Turtle.rmtree` with `System.Directory.removePathForcibly`
to fix the following issues on Windows.

`spago psc-package-clean` (and its test) fail because:
1. Git marks files under its /objects subdirectory as read-only
2. Turtle.rmtree fails to delete files marked as read-only

So `rmtree` fails to remove any folder that's a git repository.

As well as `psc-package-clean`, general test cleanup fails, meaning the
test suite will fail completely when run for the second time.
Copy link
Member

@f-f f-f left a comment

Choose a reason for hiding this comment

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

Thanks @stkb, looks great!

I added you as collaborator so you can merge when CI passes 🙂

@stkb stkb merged commit 82c72fb into purescript:master May 30, 2019
@stkb
Copy link
Contributor Author

stkb commented May 30, 2019

Thanks!

@stkb stkb deleted the rmtree-alternative branch May 30, 2019 15:01
@f-f
Copy link
Member

f-f commented May 30, 2019

You're welcome 🙂

elliotdavies pushed a commit to elliotdavies/spago that referenced this pull request Jul 1, 2019
Fix psc-package-clean and test cleanup on Windows

Replaces use of `Turtle.rmtree` with `System.Directory.removePathForcibly`
to fix the following issues on Windows.

`spago psc-package-clean` (and its test) fail because:
1. Git marks files under its /objects subdirectory as read-only
2. Turtle.rmtree fails to delete files marked as read-only

So `rmtree` fails to remove any folder that's a git repository.

As well as `psc-package-clean`, general test cleanup fails, meaning the
test suite will fail completely when run for the second time.
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.

2 participants