gauge-sh/tach

disable allowing for <root> in tach.toml?

gwdekker opened this issue · 2 comments

Hey, is there a way of configuring tach to not allow dependencies on <root>? I would like the following behavior:

  • when running tach sync, never introduce <root> but fail instead
  • when tach.toml was manually added to include <root>, fail on tach check

This would make it easier for people in my repo to start using tach and not by accident introduce <root> deps because they forgot to explicitly add a new module.

This makes sense to me as a configurable option! Something like root_module: 'forbid', which would give the behavior you described. There was another request to simply hide all of the <root> instances, which could correspond to something like root_module: 'ignore'. A middle ground might be to allow <root> to have its own listed depends_on key, but not allow any other modules to depend on <root>, this might be root_module: 'dependencies-only'

This (or maybe a simpler version) should go out in the next release.

EDIT: This is a bit delayed! Will ping back in this thread when it's available.

Thanks for adding this!