Skip to content

Clojure compatibility: attr-map? optioin support in ns  #1159

Closed
@ikappaki

Description

@ikappaki

Hi,

there's a Clojure ns attr-map? option that is currently not supported in Basilisp

 error occurred during macroexpansion: Namespace option must be a keyword {:option [:a 5]}

Would it be possible to add it?

According to this clojuredoc comment, the attr-map? should be merged with the namespace meta.

To reproduce

  1. Open up the REPL and add a docstring and an attrmap to the namespace declaration, it fails with the above error
> basilisp repl
basilisp.user=> (ns issue "abc" {:a 5})

  exception: <class 'basilisp.lang.exception.ExceptionInfo'> from <class 'basilisp.lang.compiler.exception.CompilerException'>
      phase: :macroexpansion
    message: error occurred during macroexpansion: Namespace option must be a keyword {:option [:a 5]}
       form: (ns issue "abc" {:a 5})
   location: <REPL Input>:1

The same works on Clojure

> clj
Clojure 1.7.0
user=> (ns issue "abc" {:a 5})
nil
issue=> (meta *ns*)
{:doc "abc", :a 5}

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions