From d9d88e8a04fccfa8e59a0a19fea1386c978a9b51 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Wed, 15 Nov 2023 17:08:32 +0000 Subject: [PATCH] v0.23.1 --- CHANGELOG.md | 4 ++++ gleam.toml | 2 +- manifest.toml | 2 +- src/gleam/erlang/file.gleam | 20 ++++++++++++++------ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d6b857..8d665f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.23.1 - 2023-11-15 + +- Fixed some internal deprecation warnings. + ## v0.23.0 - 2023-11-02 - The `gleam/erlang/file` module has been deprecated. diff --git a/gleam.toml b/gleam.toml index cde8042..8d62603 100644 --- a/gleam.toml +++ b/gleam.toml @@ -1,6 +1,6 @@ name = "gleam_erlang" -version = "0.23.0" +version = "0.23.1" licences = ["Apache-2.0"] description = "A Gleam library for working with Erlang" diff --git a/manifest.toml b/manifest.toml index 876acbc..30e0116 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,7 +2,7 @@ # You typically do not need to edit this file packages = [ - { name = "gleam_stdlib", version = "0.32.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "07D64C26D014CF570F8ACADCE602761EA2E74C842D26F2FD49B0D61973D9966F" }, + { name = "gleam_stdlib", version = "0.32.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "ABF00CDCCB66FABBCE351A50060964C4ACE798F95A0D78622C8A7DC838792577" }, { name = "gleeunit", version = "0.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "1397E5C4AC4108769EE979939AC39BF7870659C5AFB714630DEEEE16B8272AD5" }, ] diff --git a/src/gleam/erlang/file.gleam b/src/gleam/erlang/file.gleam index e314090..48e11a7 100644 --- a/src/gleam/erlang/file.gleam +++ b/src/gleam/erlang/file.gleam @@ -266,8 +266,12 @@ pub type FileInfo { /// ``` /// @deprecated("Use the simplifile package instead") +pub fn file_info(a: String) -> Result(FileInfo, Reason) { + do_file_info(a) +} + @external(erlang, "gleam_erlang_ffi", "file_info") -pub fn file_info(a: String) -> Result(FileInfo, Reason) +fn do_file_info(a: String) -> Result(FileInfo, Reason) /// Results in `FileInfo` about the given `path` on success, otherwise a /// `Reason` for failure. @@ -337,8 +341,12 @@ pub fn file_info(a: String) -> Result(FileInfo, Reason) /// ``` /// @deprecated("Use the simplifile package instead") +pub fn link_info(a: String) -> Result(FileInfo, Reason) { + do_link_info(a) +} + @external(erlang, "gleam_erlang_ffi", "link_info") -pub fn link_info(a: String) -> Result(FileInfo, Reason) +fn do_link_info(a: String) -> Result(FileInfo, Reason) /// Results in a `Bool` on success that indicates whether the given `path` has /// a `Directory` `FileType`, otherwise a `Reason` for failure. @@ -360,7 +368,7 @@ pub fn link_info(a: String) -> Result(FileInfo, Reason) /// @deprecated("Use the simplifile package instead") pub fn is_directory(path: String) -> Result(Bool, Reason) { - use FileInfo(file_type: file_type, ..) <- result.map(over: file_info(path)) + use FileInfo(file_type: file_type, ..) <- result.map(over: do_file_info(path)) file_type == Directory } @@ -384,7 +392,7 @@ pub fn is_directory(path: String) -> Result(Bool, Reason) { /// @deprecated("Use the simplifile package instead") pub fn is_regular(path: String) -> Result(Bool, Reason) { - use FileInfo(file_type: file_type, ..) <- result.map(over: file_info(path)) + use FileInfo(file_type: file_type, ..) <- result.map(over: do_file_info(path)) file_type == Regular } @@ -414,7 +422,7 @@ pub fn is_regular(path: String) -> Result(Bool, Reason) { pub fn file_exists(path: String) -> Result(Bool, Reason) { let result = path - |> file_info + |> do_file_info |> result.replace(True) case result { Error(Enoent) -> Ok(False) @@ -448,7 +456,7 @@ pub fn file_exists(path: String) -> Result(Bool, Reason) { pub fn link_exists(path: String) -> Result(Bool, Reason) { let result = path - |> link_info + |> do_link_info |> result.replace(True) case result { Error(Enoent) -> Ok(False)