amtoine / nu-git-manager

A collection of Nushell tools to manage Git repositories.
GNU General Public License v3.0
26 stars 2 forks source link

`unfold` is deprecated #96

Closed amtoine closed 10 months ago

amtoine commented 10 months ago

Describe the bug

found the use of a deprecated command just after releasing 0.3.0 and trying out gm clean :yum:

unfold is going to be renamed generate very soon :smirk:

How to reproduce

  1. tk run --clean { gm clone https://github.com/amtoine/nu-git-manager --depth 1 }
  2. tk run { gm update-cache; gm clean }
  3. see
    Error:   × Deprecated option
    ╭─[/home/amtoine/.local/share/nupm/modules/nu-git-manager/fs/dir.nu:6:1]
    6 │ export def clean-empty-directories-rec []: list<path> -> list<path> {
    7 │     let deleted = unfold $in {|directories|
    ·                   ───┬──
    ·                      ╰── `unfold` is deprecated and will be removed in 0.88.
    8 │         let next = $directories | each {|it|
    ╰────
    help: Please use `generate` instead.

Expected behavior

no deprecation warning

Configuration

key value
version 0.87.0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.73.0 (cc66ad468 2023-10-03)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.73.0 (9c4383fb5 2023-08-26)
build_time 2023-11-15 18:45:43 +01:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash, which, zip
installed_plugins clipboard copy, clipboard paste, jwalk, nu_plugin_explore

Additional context

No response