Liking cljdoc? Tell your friends :D

Migrating from the in-app namespaces

taia.ds was extracted from an application where the same code lived under ds.*, state-machines.*, logging.* and extensions.*. Polylith needs a top namespace, so everything moved under taia.ds.*.

BeforeAfter
ds.interfacetaia.ds.datastar.interface
ds.adapters.handlers.context/ctx->data-signalstaia.ds.datastar.interface/ctx->data-signals
ds.adapters.handlers.response/->htmltaia.ds.datastar.interface/html-response
ds.adapters.*, ds.domain.* (internal)taia.ds.datastar.adapters.*, taia.ds.datastar.domain.*
state-machines.interfacetaia.ds.state-machines.interface
state-machines.test-helperstaia.ds.state-machines.test-helpers
logging.interfacetaia.ds.logging.interface
extensions.interfacetaia.ds.extensions.interface
search path "ds.adapters.components"gone: the library has no components of its own, so the default is [] and the application lists only its own prefixes
vendored /js/datastar.js, /js/sse-reconnect.jsclasspath datastar/js/…, served via wrap-resource "datastar"

Behaviour is unchanged. Two additions: ctx->data-signals and html-response are on the interface, so component code no longer needs the adapters.handlers.* namespaces.

Mechanical rewrite:

perl -pi -e 's/(?<![\w.\-])ds\.(interface|adapters|domain)\b/taia.ds.datastar.$1/g;
             s/(?<![\w.\-])state-machines\.(interface|test-helpers)\b/taia.ds.state-machines.$1/g;
             s/(?<![\w.\-])logging\.interface\b/taia.ds.logging.interface/g;
             s/(?<![\w.\-])extensions\.interface\b/taia.ds.extensions.interface/g' $(git ls-files '*.clj' '*.cljc')

Then update the search-path configuration and remove the vendored JS files.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close