bcpeinhardt / simplifile

Simple file operations for Gleam that work on all targets (Erlang/Node/Deno)
71 stars 10 forks source link

Update for Gleam v0.32 #15

Closed lpil closed 9 months ago

lpil commented 9 months ago

I've also made the tmp files be written to a git ignored tmp rather than into the src tree as a crash half way through the tests left me with various test files to delete before I could run the tests again. I hope that's ok!

bcpeinhardt commented 9 months ago

You're positively fabulous for taking the time to do this, sorry I've been consumed with the new job. I plan to rejoin the gleam world asap 😃

bcpeinhardt commented 9 months ago

Because of the way main (in test) is set up, the tests will sometimes fail to run (because delete("/tmp") will return an Error if there's no /tmp to begin with). Would you mind changing that line to ignore the delete result and then assert tmp does not exist, or use delete_all which will ignore an Enoent error? Note: That api is a bit confusing. Maybe there should be like expect_and_delete and delete_if_found or something. Naming things is hard.

lpil commented 9 months ago

Oh yes! Thank you

bcpeinhardt commented 9 months ago

Published as 0.2.0 (just felt right with the whole new gleam version)