clojure / clojure/clojurescript-site

Clarify global exports values can employ dots

Open
#314 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

minor
Dominant language
Shell
Stars
107
Forks
130
PR merge metrics
No merged PRs in 30d

Description

See https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/compiler.cljc#L1236-L1247

This implies that if you have something in the global scope, but want to associate a sub-object with the synthetic foreign lib namespace, you can use dots to do so. (The value need not simply name a global variable.)

Some verbiage in the :global-exports explanation at https://clojurescript.org/reference/compiler-options#foreign-libs could be added, clarifying that this is the way things work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked compiler.cljc lines 1236-1247 and the :global-exports section of the foreign-libs compiler-options documentation. Update that explanation to clarify that export values may contain dots and associate a sub-object with the synthetic foreign library namespace; done when the documented behavior matches the compiler.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.