dkorunic / betteralign

Make your Go programs use less memory (maybe)
BSD 3-Clause "New" or "Revised" License
671 stars 14 forks source link

go install fails #2

Closed cemremengu closed 1 year ago

cemremengu commented 1 year ago

I am on windows running the command and getting the following error:

go install github.com/dkorunic/betteralign/cmd/betteralign@latest
# github.com/dkorunic/betteralign
..\..\go\pkg\mod\github.com\dkorunic\betteralign@v0.2.2\betteralign.go:519:21: undefined: renameio.WriteFile
..\..\go\pkg\mod\github.com\dkorunic\betteralign@v0.2.2\betteralign.go:519:60: undefined: renameio.IgnoreUmask
dkorunic commented 1 year ago

Sadly @cemremengu that's expected -- renameio library doesn't support Windows platform due to lack of atomic I/O. I can possibly add a dummy function that will write and rename files emulating atomic I/O, but there will be no guarantees like on Un*x and Linux systems.

dkorunic commented 1 year ago

I've enabled non-atomic I/O for Windows platform and issued a new release with Windows platform enabled: https://github.com/dkorunic/betteralign/releases/tag/v0.2.3 Have in mind, there are zero file I/O durability guarantees on Windows.