Shai asked how one can count the number of modules in a Tuist project. Even though we don’t have a first-class solution for that, you can use tuist dump
in combination with jq
as suggested by @danieleformichelli to achieve that:
tuist dump | jq '.targets | length'
View in #support on Slack
@Shai_Mishali : is there an easy way to get a count of all modules in a tuist project?
@Daniele_Formichelli : Maybe tuist dump
and ask ChatGPT to extract it using jq
?
@Shai_Mishali : haha
i tried tuist graph --format json
but that’s also hard
@Mike : there has been some thought on making graph inspection generally easier to do, but nothing has shipped (or been shared as a prototype yet even) https://hachyderm.io/@Waltflanagan/113035515423036297
Hachyderm.io : Mike Simons (@Waltflanagan @hachyderm.io)
@Pedro : I’d follow @Daniele_Formichelli ’s recommendation. When we have the solution that @Mike referenced it’ll much easier, but need some time to implement it
@Stefan_Fessler : one question: don’t you have every module in a subfolder of your project? maybe count them?
project
• modules
◦ moduelA
◦ moduelB
◦ ….
@Daniele_Formichelli : Isn’t tuist dump | jq '.targets | length'
enough or am I missing something?
@Stefano_Mondino : might be harder if “project” is actually a workspace made of many projects