1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

Change nu-deps script to not care about waves (#667)

The script was running endlessly for me and the notion of crate waves
may be out of date, after removing them and manually aligning the output
with the relevant crate waves things went smooth.
This commit is contained in:
Stefan Holderbach 2023-11-14 18:19:19 +01:00 committed by GitHub
parent 1fd3a3fa6a
commit 99fe279311
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,26 +26,21 @@ def get-target-dependencies [] {
# For each Nushell crate in the first publishing wave, open its Cargo.toml and # For each Nushell crate in the first publishing wave, open its Cargo.toml and
# gather its dependencies. # gather its dependencies.
def find-deps [] { def find-deps [] {
let second_wave = [ 'nu-command' ]
let third_wave = [ 'nu-cli' ]
ls crates/nu-*/Cargo.toml | get name | each {|toml| ls crates/nu-*/Cargo.toml | get name | each {|toml|
let crate = ($toml | path dirname | path basename) let crate = ($toml | path dirname | path basename)
let data = (open $toml) let data = (open $toml)
if not (($crate in $second_wave) or ($crate in $third_wave)) { mut deps = []
mut deps = [] $deps ++= ($data | get -i 'dependencies' | default {} | columns)
$deps ++= ($data | get -i 'dependencies' | default {} | columns) $deps ++= ($data | get -i 'dev-dependencies' | default {} | columns)
$deps ++= ($data | get -i 'dev-dependencies' | default {} | columns) $deps ++= ($data | get-target-dependencies)
$deps ++= ($data | get-target-dependencies) let $deps = ($deps
let $deps = ($deps | where ($it | str starts-with 'nu-')
| where ($it | str starts-with 'nu-') | where not ($it == 'nu-ansi-term'))
| where not ($it == 'nu-ansi-term'))
{ {
'crate': $crate 'crate': $crate
'dependencies': $deps 'dependencies': $deps
}
} }
} }
} }