This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.
For anyone following around/playing with packs (packwerk clone built in Rust), we now have cycle detection! Packs behaves a bit different than packwerk here:
Instead of validate, packs has 1 command instead of 2, so cycle detection runs with packs check
The output shows groups of strongly connected components (whereas packwerk shows a sampling of specific paths through cycles)
Having the same command do both breaks expectations for a drop-in replacement, e.g., you can no longer put packs check into a pre-commit hook if you have cyclic dependencies that you currently ignore.
I think keeping the CLI as close as possible to packwerk would help with adoption.
Oh right – I forgot some users of packwerk don’t use cycle detection.
Having separate commands for check and validate would be fine, but I’m trying to see if we can have our cake and eat it too here. I wonder if we can have packwerk.yml support a flag to do cycle detection within check (or some flag to disable cycle detection, since the default mode in packwerk is that it’s on).
True — I was more thinking that the new option could be for packs users only (e.g. validate_on_check). But I see your point – it’s nice to keep things as close to possible with the vanilla configuration for now.
I have more. There seems to be a regression caused by https://github.com/alexevanczuk/packs/pull/70 where check doesn’t report any violations even though an older version and bin/packwerk check do