Skip to content

fix(compiler): resolve, name, and load namespaces by source extension (#116) - #117

Merged
skydread1 merged 3 commits into
developfrom
fix/source-extension-precedence
Jul 31, 2026
Merged

fix(compiler): resolve, name, and load namespaces by source extension (#116)#117
skydread1 merged 3 commits into
developfrom
fix/source-extension-precedence

Conversation

@skydread1

Copy link
Copy Markdown
Member

Closes #116

  • source-extensions becomes [".cljr" ".cljc" ".clj"] in both copies, matching ClojureCLR.
  • compile-file derives the assembly name from the source extension, so foo.cljc emits foo.cljc.dll.
  • -load takes its assembly candidate from the resolved source's extension instead of searching independently, so a stale foo.clj.dll cannot win an mtime comparison against foo.cljc.
  • Pairing the assembly with its source is a deliberate divergence from ClojureCLR. No library source changes, so libraries still load on stock cljr.
  • IsCljAssembly matches all three suffixes, and the coexistence import hooks use it instead of their own check.
  • The smoke suite's interop namespace becomes .cljr, giving the IL2CPP build a mixed assembly set.
  • A test pins the two copies of source-extensions in agreement, since build.clj compiles magic.api against the previous clojure.core.

#116)

IsCljAssembly matches .clj.dll, .cljc.dll and .cljr.dll; the coexistence
import hooks use it instead of their own suffix check.
…#116)

source-extensions becomes [".cljr" ".cljc" ".clj"] in both copies.
compile-file derives the assembly name from the source extension, so foo.cljc
emits foo.cljc.dll. -load takes the assembly candidate from the resolved
source's extension instead of searching for it independently. smoke/interop
becomes .cljr.
@skydread1 skydread1 self-assigned this Jul 31, 2026
@skydread1
skydread1 merged commit be388af into develop Jul 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Namespace resolution prefers .clj over .cljc, diverging from ClojureCLR

1 participant