odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.12k stars 550 forks source link

Add missing imports to `core` test suite #3781

Closed Feoramund closed 2 weeks ago

Feoramund commented 2 weeks ago

I forgot about this.

Feoramund commented 2 weeks ago

The core:flags Windows test failed for error code 32.

ERROR_SHARING_VIOLATION

32 (0x20)

The process cannot access the file because it is being used by another process.

It failed on the cleanup part of checking if os.Handle is parsed correctly where it deletes the temporary file. I'm wondering if I should strike that out, since I'm not sure in what way this error is arising, and it's not highly necessary to remove it since it's only a few bytes.

laytan commented 2 weeks ago

I am pretty sure that error arises there because you have not closed your file handles before trying to delete the file, the defers run after your attempted deletion.

Feoramund commented 2 weeks ago

Oh, that makes perfect sense. I can just defer the removal too. Why this is allowed on every other platform is beyond me.