oakmac / oakmac/standard-clojure-style-js
metadata in :require-macros corrupts the requires list
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 137
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
follow-up to Issue #125
Currently produces a bogus [:no-doc] require-macros entry (confirmed on both your branch and unpatched HEAD — same bug class as #125, different form). Expected mirrors the :require design exactly: metadata array key, metadata line above, travels when sorting.
# metadata on require-macros line
> same as GitHub Issue #125, but for :require-macros
> currently produces a bogus [:no-doc] require
--Input
(ns com.example.my-app
(:require-macros
^:no-doc
[zzz.macros :as z]
[aaa.macros]))
--Input
--Expected
(ns com.example.my-app
(:require-macros
[aaa.macros]
^:no-doc
[zzz.macros :as z]))
--Expected
# metadata on require-macros line
--Input
(ns com.example.my-app
(:require-macros
^:no-doc
[zzz.macros :as z]
[aaa.macros]))
--Input
--Expected
{
"nsSymbol": "com.example.my-app",
"requireMacros": [
{
"symbol": "aaa.macros"
},
{
"metadata": ["^:no-doc"],
"symbol": "zzz.macros",
"as": "z"
}
]
}
--Expected
And for issue 2, I kept metadata as the key name on requireMacros entries rather than inventing a parallel name, since the objects already share symbol/as/commentsAbove conventions with requires.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied :require-macros input and comparing the current parsed and formatted output with the expected examples. Trace the existing handling for :require and the related work from Issue #125, then apply the same metadata behavior to requireMacros; done means the metadata array and ordering match the expected JSON and Clojure output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100