Lint integrant component defmethods for conventions consistent with ig/load-namespaces #1482
Unanswered
RickMoynihan
asked this question in
Q&A
Replies: 3 comments
-
This might be possible using a hook, but hooks currently don't receive the current namespace name. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hooks now receive the current ns as an argument. I'll convert to a Github Discussion in case you have more questions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Integrant systems can work with arbitrary namespaced keywords; however if you use the convenience function ig/load-namespaces to dynamically require and compile components based on their declared integrant dependencies, you need to follow additional conventions that ensure the namespaced keywords are put in namespaces that are inferable from the component key names.
If this convention isn't followed it is possible to create subtle bugs in integrant systems where they work by accident, but after reconfiguration don't.
Suggested solution
Lint that keys used in integrant
defmethod
s (e.g.ig/init-key
ig/prep-key
ig/pre-init-spec
ig/halt-key
) are located in namespaces who's names are inferable from their declared keys. e.g.Beta Was this translation helpful? Give feedback.
All reactions