Pants: Goal to display files that are not tracked by pants, but could/should be

Created on 12 Nov 2020  路  6Comments  路  Source: pantsbuild/pants

(further details welcome!)

Q42020-idea

Most helpful comment

All 6 comments

cc @cristianmatache

After some discussion today, one way I could imagine this working would be for the roots goal to render:

  1. the resulting stripped prefixes per-file
  2. which files had _no_ roots applied (including if that was because no target owned the file)

At that point, this could be our answer to "an init goal", except rather than being one-time-use, it could be used multiple times, and report information about your layout and how you might want to adjust it.

Note that since the repo root is a source root by default, there won't be files that have no roots applied (unless that default is purposely overridden).

@benjyw : True. Although even if everything has a source root, files might still not have an owning target, which would be roughly equivalent to not having a source root. This is a parallel universe of requirements: both 1) file layout, 2) targets are necessary.

(aside: the docs that @Eric-Arellano has written about source roots are great: https://www.pantsbuild.org/v2.3/docs/source-roots ... this hypothetical goal might be assisting with applying that advice)

Was this page helpful?
0 / 5 - 0 ratings