Skip to content

Make 'Start-PsBuild -Clean' not prompt due to locked files when Visual Studio is open by excluding sqlite3 folder and use -x instead of -X option on git clean - #7235

Merged
Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:masterfrom
bergmeister:MakeCleanWorkWhenUsingVS
Jul 9, 2018

Conversation

@bergmeister

@bergmeister Christoph Bergmeister (bergmeister) commented Jul 5, 2018

Copy link
Copy Markdown
Contributor

PR Summary

Due to this Roslyn issue, some files in the sqlite3 folder inside the temporary .vs folder get locked and cannot be cleaned. This happens when calling Start-PSBuild -Clean when VS is open and is very annoying.
This PR makes Start-PSBuild -Clean use the 'better' -x option on git clean and exclude this folder (both changes are needed to overcome the Roslyn issue).

PR Checklist

Comment thread build.psm1 Outdated
# Excluded sqlite3 folder is due to this Roslyn issue: https://github.com/dotnet/roslyn/issues/23060
git clean -fdx --exclude .vs/PowerShell/v15/Server/sqlite3
# Extra cleaning is required to delete the CMake temporary files.
# These are not cleaned when using "X" and cause CMake to retain state, leading to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe update the comment

@bergmeister Christoph Bergmeister (bergmeister) Jul 6, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we rather remove this unchanged block (i.e. the comment and the 2nd git clean -fdx below)?
Was there a reason why the -X option was chosen initially?

@TravisEz13 Travis Plunk (TravisEz13) Jul 6, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was there a reason why the -X option was chosen initially?

I'm not sure. The results of -gdx seem better to me with no unexpected effects.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit ef10460 into PowerShell:master Jul 9, 2018
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…l Studio is open by excluding sqlite3 folder and use -x instead of -X option on git clean (PowerShell#7235)

* Exclude sqllite  folder when cleaning and use -x instead of -X option

* Remove 2nd git clean block which is redundant now
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.

3 participants