zephyrproject-rtos / west

West, Zephyr's meta-tool
https://docs.zephyrproject.org/latest/guides/west/index.html
Apache License 2.0
225 stars 120 forks source link

west init completes but leaves everything in zephyr/manifest-tmp #558

Closed jefffhaynes closed 1 year ago

jefffhaynes commented 2 years ago

I have no idea what causes this or how to reliably reproduce it, but running west init on windows occasionally leaves everything in the zephyr/manifest-tmp folder upon "successful" completion. west update subsequently fails because everything is in the wrong place.

amil13 commented 5 months ago

~Looks like it's because I'm running west in a virtual environment. Without the virtual environment, works ok. With the path to the virtual environment set, it breaks.~

The plot thickens.

After lots of testing. I've narrowed it down to whether or not VSCode has the folder open. It appears to be scanning the files inside the .west folder. When west is ready to transfer the repo to it's final resting place, it's prevented from doing so because VSCode is indexing the files.

When I close VSCode and run it in a terminal with same environment, it runs perfectly fine.

Hope this helps people that may come across the same problem!

So this helped me too. When I closed my VScode, the west init zephyrproject worked fine from inside the venv.

marc-hb commented 5 months ago

Thanks for the confirmation @amil3. Please report this issue to the VSCode project. VScode should go easy on NTFS filesystems that do not support concurrency and it should not scan as aggressively as it does right now because this requires exclusive ownership. This is not specific to west, it could happen every time VScode reads while anything else writes at the same time.

marc-hb commented 5 months ago

VScode should go easy on NTFS filesystems that do not support concurrency

https://en.wikipedia.org/wiki/ReFS supports copy-on-write so it's likely not affected. However it's missing many NTFS features which is probably why its availability is very limited.

timonsku commented 5 months ago

Windows 11 now has support for what they call "Dev Drives" which uses ReFS. Maybe worth a note in the setup guide that this could be useful to use for a Zephyr installation/project on Windows. https://learn.microsoft.com/en-us/windows/dev-drive/

marc-hb commented 5 months ago

Windows 11 now has support for what they call "Dev Drives" which uses ReFS.

Very interesting, thanks for sharing!

EDIT: as of end of March 2024, this is not in the General release channel.

Maybe worth a note in the setup guide that this could be useful to use for a Zephyr installation/project on Windows.

It very likely would be worth it, cc: @tejlmand , @carlescufi , @stephanosio ,...

However, from the narrow/selfish perspective of this very specific west init failure it would be fantastic if a couple of the Windows users who reported the issue and who can still reproduce could confirm that this "Dev Drive" solves it.