You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeDiagnostic only includes information about the tach modules where an issue occurs, not the Python module where they occur. This means tach check can't include all of the information which would allow a developer to identify a problem import without also opening the file in which it occurs.
As an anonymized example for a LayerCheckResult:
❌ path/to/python/file.py[L3]: Cannot import 'path.to.module'. Layer 'infrastructure' ('path.to.python') is lower than layer 'product' ('path.to.module').
I would then have to open path/to/python/file.py and see that the import in question is maybe something like:
frompath.to.module.enumsimportSomeEnum
I think it would be useful for tach check to include information about both:
The Python module name of the file which contains the bad import (although this is easily inferred if you assume PYTHONPATH=.).
The Python module name of the imported module.
I'm happy to take a whack at it if y'all are ok with including this behavior.
The text was updated successfully, but these errors were encountered:
I agree, the diagnostic should include the actual import module path! The intended behavior IIRC is for that first path (path.to.module in your example error) to be the full import path (e.g. path.to.module.enums.SomeEnum).
The Python module name of the file is less of an obvious need to me, since in general Tach's diagnostics try to reference module paths which appear in the config, and the filepath is clickable to get directly to the referenced line.
We'd definitely appreciate a PR here! I'm in the middle of a refactor (#586) but I should be able to easily transplant the fix -- might be another day or two before this merges.
CodeDiagnostic
only includes information about thetach
modules where an issue occurs, not the Python module where they occur. This meanstach check
can't include all of the information which would allow a developer to identify a problem import without also opening the file in which it occurs.As an anonymized example for a
LayerCheckResult
:I would then have to open
path/to/python/file.py
and see that the import in question is maybe something like:I think it would be useful for
tach check
to include information about both:PYTHONPATH=.
).I'm happy to take a whack at it if y'all are ok with including this behavior.
The text was updated successfully, but these errors were encountered: