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

Extra compilation? #19

Open
sogaiu opened this issue Dec 4, 2019 · 0 comments
Open

Extra compilation? #19

sogaiu opened this issue Dec 4, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sogaiu
Copy link
Contributor

sogaiu commented Dec 4, 2019

Don't know if it's really a problem, but it appears one can end up with redundant compilations invoking build.

main-ns in build is typically a string IIUC. namespaces appears to have symbols in it and may end up including the namespace that main-ns refers to.

Thus, (cons main-ns namespaces) can end up with a string version of main-ns as well as a symbol version:

    (let [deps-map (merged-deps)
          namespaces (mapcat (comp find-namespaces-in-dir io/file) (:paths deps-map))]
      (prep-compile-path)
      (doseq [ns (distinct (cons main-ns namespaces))]
        (println "Compiling" ns)
        (compile (symbol ns)))

I have seen "Compiling script" appear twice -- once for the string "script" and once for the symbol script.

I guess one could do (cons (symbol main-ns) namespaces) since there is a wrapping distinct. Not sure if namespaces will always contain a symbol version of main-ns.

@sogaiu sogaiu changed the title Potentially extra compilation? Extra compilation? Dec 4, 2019
@taylorwood taylorwood self-assigned this Dec 4, 2019
@taylorwood taylorwood added the bug Something isn't working label Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants