Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully deal with jars containing .clj and .cljc for same namespace #155

Closed
martinklepsch opened this issue Oct 18, 2018 · 0 comments
Closed
Labels
Analysis Analysing projects (Clojure/Script sources & Git)

Comments

@martinklepsch
Copy link
Member

Instaparse 1.4.9 contains one .clj and one .cljc file for each namespace for backwards compatibility. This is done via cljsee which transforms .cljc to plain .clj files before packaging.

instaparse/abnf.clj
instaparse/abnf.cljc
instaparse/auto_flatten_seq.clj
instaparse/auto_flatten_seq.cljc
instaparse/cfg.clj
instaparse/cfg.cljc

Now we use clojure.tools.namespace.find/find-sources-in-dir to find namespaces in a directory and it will return duplicates in this situation resulting in a weird analysis result with some namespaces duplicated, eventually failing because we have a database constraint not to insert two namespaces with the same name for the same artifact/platform.

Probably all that's needed is wrapping the call in a (set ,,,).

@martinklepsch martinklepsch added the Analysis Analysing projects (Clojure/Script sources & Git) label Oct 18, 2018
martinklepsch added a commit to cljdoc/codox that referenced this issue Oct 18, 2018
martinklepsch added a commit to cljdoc/codox that referenced this issue Nov 9, 2018
roosta added a commit to roosta/herb that referenced this issue Jul 17, 2019
Switch to cljdoc, issues where macros ns and cljs ns would generate
duplicate doc entries. See:

weavejester/codox#179
cljdoc/cljdoc#155
ptaoussanis pushed a commit to taoensso/codox that referenced this issue Jul 5, 2023
When there are multiple files (e.g. .clj and .cljc) for a namespace
Codox would analyse those namespaces twice returning the analysis
result twice as well.

cljdoc@3f2ea84
cljdoc/cljdoc#155
ptaoussanis pushed a commit to taoensso/codox that referenced this issue Jul 5, 2023
Author: @martinklepsch

When there are multiple files (e.g. .clj and .cljc) for a namespace
Codox would analyse those namespaces twice returning the analysis
result twice as well.

cljdoc@3f2ea84
cljdoc/cljdoc#155
ptaoussanis pushed a commit to taoensso/codox that referenced this issue Jul 6, 2023
Author: @martinklepsch

When there are multiple files (e.g. .clj and .cljc) for a namespace
Codox would analyse those namespaces twice returning the analysis
result twice as well.

cljdoc@3f2ea84
cljdoc/cljdoc#155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Analysing projects (Clojure/Script sources & Git)
Projects
None yet
Development

No branches or pull requests

1 participant