gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
16.51k stars 691 forks source link

Deleting Error \build\dev\erlang when on NTFS #2700

Open oronky opened 3 months ago

oronky commented 3 months ago

Related to https://github.com/gleam-lang/gleam/issues/2680 Gleam Version: v1.0.0 Operating System: Windows 10

Problem: If i try to run gleam run, gleam build, gleam test or gleam check i get Following error:

error: File IO failure
An error occurred while trying to delete this directory:
    Z:\...\build\dev\erlang
The error message from the file IO library was:
    Die Datei kann nicht geöffnet werden, weil sie gerade gelöscht wird. (os error 303)
lpil commented 3 months ago

Hello! What filesystem are you using for that drive?

oronky commented 3 months ago

I now tryed to run the Program on the Main drive c: and there its works both are using NTFS.

lpil commented 3 months ago

Interesting. I wonder what it is... I'm not as familiar with Windows as I am unix-like OSes so I'm not sure where to begin.

oronky commented 3 months ago

I will look in to it (or try to look in to it)

oronky commented 3 months ago

I tryed to debugg it on an other PC but i can't reproduce it here... I will try to reproduce it tomorrow on the PC where the problem initialy occurred.

TheMehranKhan commented 3 months ago

Related to #2680 Gleam Version: v1.0.0 Operating System: Windows 10

Problem: If i try to run gleam run, gleam build, gleam test or gleam check i get Following error:

error: File IO failure
An error occurred while trying to delete this directory:
    Z:\...\build\dev\erlang
The error message from the file IO library was:
    Die Datei kann nicht geöffnet werden, weil sie gerade gelöscht wird. (os error 303)

i had similar issues on windows 11, based on what you've said, it seems like something might be interfering with Gleam's attempt to delete the \build\dev\erlang directory.

close Gleam processes that might be running, then disable your antivirus then try running your Gleam command again to see if the issue persists, mine was because of some unknown anti virus that was on the windows and i didn't know it was there, no issues on mac so far.

hope this helps solve the issue.

oronky commented 3 months ago

I can't test it because it is a company managed PC but im pretty sure it is a problem with antivirus because on my computer at home it worked without problems.

lpil commented 3 months ago

Another user is having the problem on Windows on an external drive

gleam_run_trace.txt

oronky commented 3 months ago

The Problem i had is definitely a problem with the antivirus/security configuration of the company I work for. I had similar problem with npm today:

npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'Z:\...\node-v20.11.1-win-x64\node_modules\vscode-languageserver\node_modules\vscode-jsonrpc\lib\node'] {
lpil commented 3 months ago

Is that also on a secondary drive @oronky ?

lpil commented 3 months ago

Logs from https://github.com/gleam-lang/gleam/issues/2819

https://github.com/gleam-lang/gleam/files/14726176/log.txt

tulilirockz commented 1 month ago

Funnily enough im getting this error on a BTRFS filesystem (bindfs mounted folder tho)

Reiwilde commented 1 month ago

Hello, I have a similar issue with a folder mounted has a docker volume in a colima vm on mac os. Colima mount the folder in the vm with sshfs.

Gleam Version: v1.1.0 and v1.2.0-rc2 Operating System: macOS Sonoma 14.5 (ARM cpu)

ChiefTwoPencils commented 1 week ago

Also seeing this issue. Main drive is NTFS; secondary is exFAT. add, run, build, test, and check complain about writing. clean complains about deleting, but because the directory isn't empty (145). vscode also seems to throw write errors when opening .gleam files.

I've tried disabling Windows Defender without luck. No other antivirus software on the machine.

Delete

PS D:\> gleam clean
error: File IO failure

An error occurred while trying to delete this directory:

    D:\...\build

The error message from the file IO library was:

    The directory is not empty. (os error 145)

Write

PS D:\> gleam check
  Resolving versions
Downloading packages
error: File IO failure

An error occurred while trying to write to this directory:

    D:\...\build\packages\gleeunit

The error message from the file IO library was:

    failed to unpack `\\?\D:\...\build\packages\gleeunit\src\gleeunit.erl`
0xEDU commented 1 week ago

Hi, also seeing this problem in a linux NFS environment. I suspect that Gleam has an issue with network file systems.

Gleam Version: v1.2.1 Operating System: Ubuntu 20.04.5 LTS

B-R-P commented 1 week ago

I cross compiled to i686-pc-windows-gnu. I ran it on my windows 8.1 32bit. I have same problem