juhp / fbrnch

Tool to update fedora packages branches
https://hackage.haskell.org/package/fbrnch
GNU General Public License v2.0
23 stars 3 forks source link

Improve cycle printout #4

Closed QuLogic closed 4 years ago

QuLogic commented 4 years ago

For interest's sake, I ran fbrnch sort --branch master R-*. As expected, this resulted in some cycles:

fbrnch: Cycles in dependencies:
R-xtable R-knitr R-xfun R-tinytex R-rmarkdown R-testthat R-R6 R-rlang R-vctrs R-zeallot R-purrr R-tidyselect R-tibble R-pkgconfig R-disposables R-pillar R-utf8 R-cli R-glue R-RSQLite R-stringr R-htmlwidgets R-jsonlite R-plyr R-htmltools R-markdown R-rprintf R-microbenchmark R-ggplot2 R-viridisLite R-hexbin R-svglite R-xml2 R-mockery R-gdtools R-systemfonts R-scales R-munsell R-lifecycle R-hms R-lubridate R-farver R-bit64 R-bit R-roxygen2 R-pkgload R-pkgbuild R-desc R-callr R-processx R-commonmark R-rgeos R-reshape2 R-profvis R-shiny R-sourcetools R-promises R-later R-future R-R.rsp R-ascii R-listenv R-httpuv R-websocket R-fastmap R-devtools R-whisker R-usethis R-styler R-rematch2 R-prettycode R-dplyr R-nycflights13 R-ellipsis R-dbplyr R-broom R-tidyr R-repurrrsive R-wesanderson R-gapminder R-readr R-spelling R-pdftools R-qpdf R-askpass R-hunspell R-clipr R-pkgdown R-rsconnect R-reticulate R-rappdirs R-packrat R-httr R-openssl R-sodium R-fs R-gh R-pingr R-ini R-clisymbols R-sessioninfo R-rversions R-rhub R-whoami R-rematch R-rcmdcheck R-xopen R-parsedate R-remotes R-lintr R-xmlparsedata R-rex R-lazyeval R-cyclocomp R-gmailr R-gargle R-foghorn R-rvest R-selectr R-progress R-forcats R-mockr R-import
R-Rmpfr R-Bessel

The second line is clear because it's just two, but it's really hard to understand the first line. There are 123 packages there, and it's certainly not the case that the first one depends on the second depends on the third, etc., down to the last, which depends on the first.

juhp commented 4 years ago

Yea, let me try to look into this further. I have also seen this: I am not sure how easy it is to improve through. Again this is in rpmbuild-order, which is just using a graph library function to find the strongly connected components (SCC) of the graph.

Though until recently I hadn't seen such long cycles...

juhp commented 4 years ago

Some notes from my initial investigation: (mostly just for posterity)

Hmm, I found a smaller cycle at least:

R-knitr R-markdown R-xfun R-htmltools R-rlang R-cli R-glue R-dplyr R-bit64 R-bit

Removing R-knitr seems to help some: since it is a key dependency for a subset of the packages.

But after that I found a cycle:

R-roxygen2 R-purrr R-tibble R-hms R-lubridate R-vctrs R-pillar R-pkgdown R-fs R-rematch2 R-rsconnect R-reticulate R-rappdirs R-zeallot R-tidyselect

within another larger cycle (R-R.rsp R-markdown R-xfun R-htmltools R-rlang R-cli R-glue R-dplyr R-bit64 R-bit R-microbenchmark R-ggplot2 R-lazyeval R-rmarkdown R-callr R-processx R-R6 R-testthat R-ellipsis R-pkgload R-desc R-pkgbuild R-jsonlite R-plyr R-stringr R-htmlwidgets R-tinytex R-munsell R-reshape2 R-rgeos R-scales R-farver R-hms R-lubridate R-vctrs R-pillar R-utf8 R-pkgdown R-fs R-spelling R-commonmark R-xml2 R-mockery R-hunspell R-pdftools R-qpdf R-askpass R-tibble R-lifecycle R-mockr R-pkgconfig R-disposables R-purrr R-tidyselect R-httr R-httpuv R-later R-promises R-future R-listenv R-websocket R-openssl R-sodium R-rematch2 R-rsconnect R-packrat R-reticulate R-rappdirs R-roxygen2 R-shiny R-fastmap R-sourcetools R-whisker R-zeallot R-svglite R-gdtools R-systemfonts R-broom R-tidyr R-readr R-clipr R-repurrrsive R-gapminder R-wesanderson R-dbplyr R-nycflights13 R-RSQLite R-forcats R-rprintf R-remotes R-pingr).

import SimpleCmd.RPM

pkgs = ["R-ascii","R-knitr","R-markdown","R-xfun","R-htmltools","R-rlang","R-cli","R-glue","R-dplyr","R-bit64","R-bit","R-microbenchmark","R-ggplot2","R-hexbin","R-lazyeval","R-rmarkdown","R-callr","R-processx","R-R6","R-testthat","R-ellipsis","R-pkgload","R-desc","R-pkgbuild","R-jsonlite","R-plyr","R-stringr","R-htmlwidgets","R-tinytex","R-munsell","R-reshape2","R-rgeos","R-scales","R-farver","R-hms","R-lubridate","R-vctrs","R-pillar","R-utf8","R-pkgdown","R-fs","R-spelling","R-commonmark","R-xml2","R-mockery","R-hunspell","R-pdftools","R-qpdf","R-askpass","R-tibble","R-import","R-lifecycle","R-mockr","R-pkgconfig","R-disposables","R-purrr","R-tidyselect","R-httr","R-httpuv","R-later","R-promises","R-future","R-listenv","R-R.rsp","R-websocket","R-openssl","R-sodium","R-rematch2","R-rsconnect","R-packrat","R-reticulate","R-rappdirs","R-roxygen2","R-shiny","R-fastmap","R-sourcetools","R-xtable","R-whisker","R-zeallot","R-viridisLite","R-svglite","R-gdtools","R-systemfonts","R-broom","R-tidyr","R-readr","R-clipr","R-repurrrsive","R-gapminder","R-wesanderson","R-dbplyr","R-nycflights13","R-RSQLite","R-forcats","R-rprintf","R-remotes","R-pingr"]

checkpkg (p:ps) fdeps = (if p `elem` fdeps then rpmspec ["--buildrequires"] Nothing (p </> p <.> "spec") else putStrLn p >> return pkgs) >>= checkpkg ps

checkpkg pkgs pkgs

This little Haskell function prints out nodes that might start cycles (ie are not a dep of the preceding package).

I tried using graphviz to visualize the graph but my graphviz powers are low and only got out a ball of wool...


Also: warning: bogus date in %changelog: Sat Jun 4 2020 Tom Callaway spot@fedoraproject.org - 0.2.0-2

warning: bogus date in %changelog: Thu Jun 5 2020 Tom Callaway spot@fedoraproject.org - 1.1.0.1-1

juhp commented 4 years ago

This new feature should be in the next rpmbuild-order release and then I will do a new copr build of fbrnch.

juhp commented 4 years ago

Oh, and the output now for your package set is:

$ rpmbuild-order sort R-*
rpmbuild-order: Cycles in dependencies:
R-xtable R-knitr R-xfun R-tinytex R-rmarkdown R-testthat R-R6 R-rlang R-vctrs R-zeallot R-purrr R-tidyselect R-tibble R-pkgconfig R-disposables R-pillar R-utf8 R-cli R-glue R-RSQLite R-stringr R-htmlwidgets R-jsonlite R-plyr R-htmltools R-markdown R-rprintf R-microbenchmark R-ggplot2 R-viridisLite R-hexbin R-svglite R-xml2 R-mockery R-gdtools R-systemfonts R-scales R-munsell R-lifecycle R-hms R-lubridate R-farver R-bit64 R-bit R-roxygen2 R-pkgload R-pkgbuild R-desc R-callr R-processx R-commonmark R-rgeos R-reshape2 R-dplyr R-nycflights13 R-ellipsis R-dbplyr R-broom R-tidyr R-repurrrsive R-wesanderson R-gapminder R-readr R-spelling R-pdftools R-qpdf R-askpass R-hunspell R-clipr R-lazyeval R-forcats R-mockr R-import R-pkgdown R-whisker R-rematch2 R-rsconnect R-shiny R-sourcetools R-promises R-later R-future R-R.rsp R-ascii R-listenv R-httpuv R-websocket R-fastmap R-reticulate R-rappdirs R-packrat R-httr R-openssl R-sodium R-fs R-remotes R-pingr
Subcycles: 
R-knitr R-xtable
R-xfun R-knitr
R-tinytex R-xfun
R-testthat R-rmarkdown
R-R6 R-testthat
R-vctrs R-rlang
R-zeallot R-vctrs
R-purrr R-zeallot
R-tidyselect R-purrr
R-tibble R-tidyselect
R-pkgconfig R-tibble
R-disposables R-pkgconfig
R-utf8 R-pillar
R-glue R-cli
R-RSQLite R-glue
R-htmlwidgets R-stringr
R-jsonlite R-htmlwidgets
R-plyr R-jsonlite
R-markdown R-htmltools
R-ggplot2 R-microbenchmark
R-viridisLite R-ggplot2
R-hexbin R-viridisLite
R-xml2 R-svglite
R-mockery R-xml2
R-systemfonts R-gdtools
R-munsell R-scales
R-lubridate R-hms
R-bit R-bit64
R-roxygen2 R-bit
R-pkgload R-roxygen2
R-pkgbuild R-pkgload
R-desc R-pkgbuild
R-processx R-callr
R-nycflights13 R-dplyr
R-tidyr R-broom
R-repurrrsive R-tidyr
R-wesanderson R-repurrrsive
R-spelling R-readr
R-pdftools R-spelling
R-qpdf R-pdftools
R-askpass R-qpdf
R-whisker R-pkgdown
R-shiny R-rsconnect
R-sourcetools R-shiny
R-later R-promises
R-R.rsp R-future
R-ascii R-R.rsp
R-websocket R-httpuv
R-rappdirs R-reticulate
R-httr R-packrat
R-openssl R-httr
R-sodium R-openssl
R-pingr R-remotes
R-rmarkdown R-xfun R-tinytex
R-rlang R-testthat R-R6
R-cli R-testthat R-utf8
R-ellipsis R-dplyr R-nycflights13
R-broom R-dplyr R-dbplyr
R-readr R-dplyr R-gapminder
R-mockr R-tibble R-forcats
R-pillar R-rlang R-testthat R-disposables
R-hms R-dplyr R-glue R-lifecycle
R-dplyr R-glue R-stringr R-reshape2
R-remotes R-xfun R-knitr R-fs
R-htmltools R-rmarkdown R-rlang R-testthat R-plyr
R-microbenchmark R-glue R-stringr R-knitr R-rprintf
R-bit64 R-vctrs R-rlang R-testthat R-farver
R-dbplyr R-dplyr R-vctrs R-rlang R-ellipsis
R-forcats R-glue R-rlang R-testthat R-lazyeval
R-rsconnect R-pkgdown R-vctrs R-tibble R-rematch2
R-stringr R-glue R-rlang R-testthat R-pkgconfig R-RSQLite
R-rprintf R-glue R-rlang R-htmltools R-xfun R-markdown
R-svglite R-ggplot2 R-glue R-stringr R-knitr R-hexbin
R-scales R-ggplot2 R-glue R-stringr R-knitr R-systemfonts
R-lifecycle R-tibble R-vctrs R-rlang R-testthat R-munsell
R-farver R-scales R-ggplot2 R-glue R-vctrs R-lubridate
R-callr R-pkgbuild R-pkgload R-testthat R-R6 R-desc
R-rgeos R-ggplot2 R-glue R-rlang R-testthat R-commonmark
R-reshape2 R-ggplot2 R-glue R-rlang R-testthat R-rgeos
R-lazyeval R-ggplot2 R-glue R-rlang R-testthat R-clipr
R-import R-tibble R-vctrs R-rlang R-testthat R-mockr
R-pkgdown R-vctrs R-glue R-stringr R-knitr R-import
R-gdtools R-svglite R-ggplot2 R-glue R-cli R-testthat R-mockery
R-gapminder R-repurrrsive R-tidyr R-broom R-dplyr R-ggplot2 R-wesanderson
R-clipr R-readr R-dplyr R-glue R-rlang R-testthat R-hunspell
R-reticulate R-rsconnect R-pkgdown R-vctrs R-rlang R-testthat R-fastmap
R-packrat R-rsconnect R-pkgdown R-vctrs R-rlang R-roxygen2 R-rappdirs
R-fs R-pkgdown R-vctrs R-rlang R-htmltools R-rmarkdown R-sodium
R-xtable R-rsconnect R-pkgdown R-vctrs R-rlang R-testthat R-pingr
R-hunspell R-spelling R-fs R-pkgdown R-vctrs R-rlang R-testthat R-askpass
R-rematch2 R-pkgdown R-vctrs R-rlang R-htmltools R-xfun R-markdown R-whisker
R-promises R-shiny R-rsconnect R-pkgdown R-vctrs R-rlang R-testthat R-sourcetools
R-future R-promises R-shiny R-rsconnect R-pkgdown R-vctrs R-rlang R-later
R-fastmap R-shiny R-rsconnect R-pkgdown R-vctrs R-rlang R-later R-websocket
R-commonmark R-spelling R-fs R-pkgdown R-vctrs R-rlang R-testthat R-R6 R-processx
R-httpuv R-httr R-pkgdown R-vctrs R-rlang R-htmltools R-xfun R-markdown R-listenv
R-listenv R-future R-promises R-shiny R-rsconnect R-pkgdown R-vctrs R-glue R-stringr R-knitr R-ascii

So if I am not wrong there are rather a large number of subcycles (listed in increasing length).

juhp commented 4 years ago

You can try fbrnch-0.2-5 in copr, which uses rpmbuild-order-0.4.1 with the subcycles enhancement. Note this also works directly for parallel which also calls rpmbuild-order.

juhp commented 4 years ago

I have added a newline between different cycles to make the output clearer when there is more than one main cycle.