Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nushell dependency analysis script #5051

Merged
merged 3 commits into from
Dec 25, 2023

Conversation

tertsdiepraam
Copy link
Member

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
Sponsor Contributor

TIL about .nu :)

@sylvestre
Copy link
Sponsor Contributor

some typos :)

@tertsdiepraam
Copy link
Member Author

Yep, I'll fix them today

util/deps.nu Outdated Show resolved Hide resolved
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
@sylvestre
Copy link
Sponsor Contributor

can we run it into the CI ?

@tertsdiepraam
Copy link
Member 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
Member 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

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
Member 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

fdncred commented Jul 15, 2023

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

@sylvestre
Copy link
Sponsor Contributor

@tertsdiepraam do you want to merge this ?

@tertsdiepraam
Copy link
Member 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
45 checks passed
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