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
This did not work for cljdoc linting with clj-kondo because it disables checking comments.
Perhaps...
We could make digest even more clj-kondo friendly.
Idea 1 - Move declare
Move declare outside of comment block.
But this could get out of synch with digest API, I suppose.
Idea 2 - Create a hook
Create a custom clj-kondo hook for digest.
But since the API depends on querying available security providers, we might have the same issue as with idea 1?
Idea 3 - Generate API source
Instead of creating digest's API at load time, statically generate digest API source code.
Idea 4 - Just hand-code it
Instead of generating digest API automatically, do it by hand.
I mean, do the available providers change with new versions of Java?
And if they do, should the digest API be automatically changing?
Probably not.
Proposal
Without a deep understanding, idea 3 seems like a reasonable choice to me.
The API would be generated under a specific JVM (if that's important).
It is similar to idea 4 but perhaps a bit less prone to human error.
Thoughts?
The text was updated successfully, but these errors were encountered:
Currently...
The digest library generates its API at load time.
Clj-kondo will discover digest API vars when
comment
s are not being skipped via this little trick:digest/src/clj_commons/digest.clj
Lines 104 to 108 in bec1e0e
But...
This did not work for cljdoc linting with clj-kondo because it disables checking
comment
s.Perhaps...
We could make digest even more clj-kondo friendly.
Idea 1 - Move declare
Move declare outside of comment block.
But this could get out of synch with digest API, I suppose.
Idea 2 - Create a hook
Create a custom clj-kondo hook for digest.
But since the API depends on querying available security providers, we might have the same issue as with idea 1?
Idea 3 - Generate API source
Instead of creating digest's API at load time, statically generate digest API source code.
Idea 4 - Just hand-code it
Instead of generating digest API automatically, do it by hand.
I mean, do the available providers change with new versions of Java?
And if they do, should the digest API be automatically changing?
Probably not.
Proposal
Without a deep understanding, idea 3 seems like a reasonable choice to me.
The API would be generated under a specific JVM (if that's important).
It is similar to idea 4 but perhaps a bit less prone to human error.
Thoughts?
The text was updated successfully, but these errors were encountered: