From d5aceb3b564d3b0094bdaea6d6c9df1ee815f866 Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Fri, 7 Jun 2024 13:41:06 +0200 Subject: [PATCH 1/5] remove `$.lazy` from `describe --detailed` this has changed in [Nushell 0.94.0](https://www.nushell.sh/blog/2024-05-28-nushell_0_94_0.html#describe-toc). --- komodo.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komodo.nu b/komodo.nu index 38b51c1a..c23b7929 100644 --- a/komodo.nu +++ b/komodo.nu @@ -150,7 +150,7 @@ export def "komodo prove" [ } let type = $fec_params | describe --detailed | update columns { sort } - let expected = { type: record, lazy: false, columns: { k: int, n: int } } + let expected = { type: record, columns: { k: int, n: int } } if $type != $expected { error make { msg: $"(ansi red_bold)invalid `--fec-params`(ansi reset)", -- GitLab From 1d1fa5f074fce239c0af8c3152aeed8601a29106 Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Fri, 7 Jun 2024 13:43:41 +0200 Subject: [PATCH 2/5] bump Nushell in the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35f4be8d..f76066c8 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ below is an example of how to use the binary application with Nushell: ``` > **Note** -> requires Nushell 0.93.0 or later +> requires Nushell 0.94.0 or later tests for the binary application can also be run with ```bash -- GitLab From f132e593ae605d50312c4af666630bbcd7028893 Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Fri, 7 Jun 2024 13:48:45 +0200 Subject: [PATCH 3/5] bump the CI --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25b7762d..9c94161b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: variables: NUSHELL_ARCH: "x86_64-unknown-linux-musl" - NUSHELL_VERSION: "0.93.0" + NUSHELL_VERSION: "0.94.2" workflow: rules: -- GitLab From f6d221f2bcd83a010a605924fbf2044bee236f75 Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Fri, 5 Jul 2024 16:52:09 +0200 Subject: [PATCH 4/5] bump to 0.95.0 this will hopefully fix the CI. --- .gitlab-ci.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c94161b..8377911e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: variables: NUSHELL_ARCH: "x86_64-unknown-linux-musl" - NUSHELL_VERSION: "0.94.2" + NUSHELL_VERSION: "0.95.0" workflow: rules: diff --git a/README.md b/README.md index f76066c8..cbbd5afb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ below is an example of how to use the binary application with Nushell: ``` > **Note** -> requires Nushell 0.94.0 or later +> requires Nushell 0.95.0 or later tests for the binary application can also be run with ```bash -- GitLab From 81bbfa5745212b04137e28abfdbb7be1fef8286f Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Fri, 5 Jul 2024 17:25:48 +0200 Subject: [PATCH 5/5] remove useless binary encode and decode --- .nushell/binary.nu | 13 ------------- tests/binary.nu | 8 +------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/.nushell/binary.nu b/.nushell/binary.nu index 0fb28ee6..2f30ec71 100644 --- a/.nushell/binary.nu +++ b/.nushell/binary.nu @@ -1,16 +1,3 @@ -# decode a list of integer bytes into the underlying encoded string -export def "bytes decode" [encoding: string = "utf-8"]: list<int> -> string { - each { into binary | bytes at 0..1 } | bytes collect | decode $encoding -} - -# encode an encoded string into the underlying list of integer bytes -export def "bytes encode" [encoding: string = "utf-8"]: string -> list<int> { - let bytes = $in | encode $encoding - seq 1 ($bytes | bytes length) | each {|i| - $bytes | bytes at ($i - 1)..($i) | into int - } -} - export def "bytes from_int" []: [int -> binary, list<int> -> binary] { each { into binary --compact } | bytes collect } diff --git a/tests/binary.nu b/tests/binary.nu index 1cb755f6..21a5a736 100644 --- a/tests/binary.nu +++ b/tests/binary.nu @@ -1,6 +1,4 @@ -use ../.nushell binary [ - "bytes decode", "bytes encode", "bytes from_int", "bytes to_int" -] +use ../.nushell binary [ "bytes from_int", "bytes to_int" ] use std assert @@ -18,8 +16,4 @@ def main [] { let bytes = random-bytes 1_000 assert equal ($bytes | bytes from_int | bytes to_int) $bytes - - const input = "hello world!" - assert equal ($input | bytes encode) $hello_world_int - assert equal ($input | bytes encode | bytes decode) $input } -- GitLab