Skip to content

Add nushell dependency analysis script#5051

Merged
sylvestre merged 3 commits intouutils:mainfrom
tertsdiepraam:deps-nu-shell
Dec 25, 2023
Merged

Add nushell dependency analysis script#5051
sylvestre merged 3 commits intouutils:mainfrom
tertsdiepraam:deps-nu-shell

Conversation

@tertsdiepraam
Copy link
Copy Markdown
Collaborator

I was playing around with nushell and made a script to analyze our dependencies. I keep trying to get a better overview of all the dependencies that we have and it's a bit of a struggle, because we have so many. I'm planning on writing a little blog post analyzing all our dependencies with this script.

The reason to add this in addition to cargo tree, cargo deny, etc. is that this gives us a table to analyze in any way we want and extend. See the list of ideas in the comments of the script. We could also, for example, figure out dependants of crates to check they are popular or that we are the only users.

Ultimately, it might be a good idea to go through the entire list of dependencies to figure out whether they are necessary. Or to figure out whether there are multiple crates doing the same thing.

@sylvestre
Copy link
Copy Markdown
Contributor

TIL about .nu :)

@sylvestre
Copy link
Copy Markdown
Contributor

some typos :)

@tertsdiepraam
Copy link
Copy Markdown
Collaborator Author

Yep, I'll fix them today

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
@sylvestre
Copy link
Copy Markdown
Contributor

can we run it into the CI ?

@tertsdiepraam
Copy link
Copy Markdown
Collaborator Author

Yeah we could if we install nushell. Currently it doesn't give any warnings, it just displays the info, so there's not much use of running it in CI. But we could add things like checking for duplicates and printing the ones that are duplicates for example.

@tertsdiepraam
Copy link
Copy Markdown
Collaborator Author

Bad news by the way: my laptops battery isn't good anymore and has become unsafe to use, so I wont have a computer to develop on for a little while. I'll be back in action at the end of July :)

@fdncred
Copy link
Copy Markdown

fdncred commented Jul 15, 2023

it's a stretch to say this is tangentially related, but, i saw the word nushell so here it goes. 😆

as one of the nushell maintainers, i've been longing to build uutils/coreutils into nushell. here's a draft pr i created if anyone is interested in joining forces nushell/nushell#9463

BTW - nice nushell script here! If you decide to run nushell in CI, one of our maintainers created this https://github.com/marketplace/actions/setup-nu

@tertsdiepraam
Copy link
Copy Markdown
Collaborator Author

@fdncred A few weeks back I joined the nushell discord to discuss integrating the two. I've been playing with nushell since then and this is the result. I wanted to contact you all about this once I had more time to work on it. Feel free to open an issue here if you see some way that we can help you with the integration!

Like I said, I can't join the effort before August but I'd love to chat afterwards.

@fdncred
Copy link
Copy Markdown

fdncred commented Jul 15, 2023

Thanks @tertsdiepraam for the support. Here's an issue I created #5088

@sylvestre
Copy link
Copy Markdown
Contributor

@tertsdiepraam do you want to merge this ?

@tertsdiepraam
Copy link
Copy Markdown
Collaborator Author

Yeah I'll clean it up a bit and fix the spelling and then we can merge it. I think this can be quite useful.

@sylvestre sylvestre merged commit 527b6e7 into uutils:main Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants