Skip to content

Commit d9d88e8

Browse files
committed
v0.23.1
1 parent ec11182 commit d9d88e8

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.23.1 - 2023-11-15
4+
5+
- Fixed some internal deprecation warnings.
6+
37
## v0.23.0 - 2023-11-02
48

59
- The `gleam/erlang/file` module has been deprecated.

gleam.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "gleam_erlang"
22

3-
version = "0.23.0"
3+
version = "0.23.1"
44
licences = ["Apache-2.0"]
55
description = "A Gleam library for working with Erlang"
66

manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# You typically do not need to edit this file
33

44
packages = [
5-
{ name = "gleam_stdlib", version = "0.32.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "07D64C26D014CF570F8ACADCE602761EA2E74C842D26F2FD49B0D61973D9966F" },
5+
{ name = "gleam_stdlib", version = "0.32.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "ABF00CDCCB66FABBCE351A50060964C4ACE798F95A0D78622C8A7DC838792577" },
66
{ name = "gleeunit", version = "0.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "1397E5C4AC4108769EE979939AC39BF7870659C5AFB714630DEEEE16B8272AD5" },
77
]
88

src/gleam/erlang/file.gleam

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,12 @@ pub type FileInfo {
266266
/// ```
267267
///
268268
@deprecated("Use the simplifile package instead")
269+
pub fn file_info(a: String) -> Result(FileInfo, Reason) {
270+
do_file_info(a)
271+
}
272+
269273
@external(erlang, "gleam_erlang_ffi", "file_info")
270-
pub fn file_info(a: String) -> Result(FileInfo, Reason)
274+
fn do_file_info(a: String) -> Result(FileInfo, Reason)
271275

272276
/// Results in `FileInfo` about the given `path` on success, otherwise a
273277
/// `Reason` for failure.
@@ -337,8 +341,12 @@ pub fn file_info(a: String) -> Result(FileInfo, Reason)
337341
/// ```
338342
///
339343
@deprecated("Use the simplifile package instead")
344+
pub fn link_info(a: String) -> Result(FileInfo, Reason) {
345+
do_link_info(a)
346+
}
347+
340348
@external(erlang, "gleam_erlang_ffi", "link_info")
341-
pub fn link_info(a: String) -> Result(FileInfo, Reason)
349+
fn do_link_info(a: String) -> Result(FileInfo, Reason)
342350

343351
/// Results in a `Bool` on success that indicates whether the given `path` has
344352
/// a `Directory` `FileType`, otherwise a `Reason` for failure.
@@ -360,7 +368,7 @@ pub fn link_info(a: String) -> Result(FileInfo, Reason)
360368
///
361369
@deprecated("Use the simplifile package instead")
362370
pub fn is_directory(path: String) -> Result(Bool, Reason) {
363-
use FileInfo(file_type: file_type, ..) <- result.map(over: file_info(path))
371+
use FileInfo(file_type: file_type, ..) <- result.map(over: do_file_info(path))
364372
file_type == Directory
365373
}
366374

@@ -384,7 +392,7 @@ pub fn is_directory(path: String) -> Result(Bool, Reason) {
384392
///
385393
@deprecated("Use the simplifile package instead")
386394
pub fn is_regular(path: String) -> Result(Bool, Reason) {
387-
use FileInfo(file_type: file_type, ..) <- result.map(over: file_info(path))
395+
use FileInfo(file_type: file_type, ..) <- result.map(over: do_file_info(path))
388396
file_type == Regular
389397
}
390398

@@ -414,7 +422,7 @@ pub fn is_regular(path: String) -> Result(Bool, Reason) {
414422
pub fn file_exists(path: String) -> Result(Bool, Reason) {
415423
let result =
416424
path
417-
|> file_info
425+
|> do_file_info
418426
|> result.replace(True)
419427
case result {
420428
Error(Enoent) -> Ok(False)
@@ -448,7 +456,7 @@ pub fn file_exists(path: String) -> Result(Bool, Reason) {
448456
pub fn link_exists(path: String) -> Result(Bool, Reason) {
449457
let result =
450458
path
451-
|> link_info
459+
|> do_link_info
452460
|> result.replace(True)
453461
case result {
454462
Error(Enoent) -> Ok(False)

0 commit comments

Comments
 (0)