Skip to content

Conversation

@conao3
Copy link

@conao3 conao3 commented Jan 7, 2026

Closes #211

Allow nil or blank :ns-prefix in codegen/write-namespace!.

Previously, using a nil :ns-prefix resulted in a namespace starting with . (e.g., .numpy), which is an illegal Java class name.

Changes

  • Modified write-namespace! to skip the prefix and dot when :ns-prefix is nil or blank
  • Added tests for the ns-prefix behavior

Example

;; Before: (write-namespace! "numpy" {:ns-prefix nil})
;; => generates namespace ".numpy" (invalid)

;; After: (write-namespace! "numpy" {:ns-prefix nil})
;; => generates namespace "numpy" (valid)

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.

Should a nil :ns-prefix be allowed in codegen/write-namespace!?

1 participant