Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions di/merge/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
21 changes: 21 additions & 0 deletions di/merge/init.q
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/ load core functionality into the module
\l ::merge.q

/ module version, read from the VERSION file rather than hardcoded, so a release bump touches one
/ plain-text file. read module-relative (`:::` resolves to di/merge) and BEFORE the export line,
/ since export:([...]) evaluates each name.
/ NB `version` must STAY in the export: di.depcheck resolves a dependency's version from the export
/ dict (checkdepversion) and classes a missing one as a FAILURE - which makes di.depcheck.init throw
/ for any process loading a module that declares this one as a hard dependency
/ trim, and fail LOUD on a missing/unreadable/empty VERSION, rather than a bare `first read0`:
/ a raw OS error names no module, and read0 strips the line terminator but NOT trailing spaces - so a
/ padded file yields a padded version, which di.depcheck compares as a STRING and silently fails
/ every dependent module's check. an empty value is worse still: it reads to depcheck as
/ "exports no version", i.e. the exact failure the VERSION file was added to prevent
version:@[{trim first read0 x};`:::VERSION;{'"di.merge: VERSION file missing or unreadable"}];
if[0=count version;'"di.merge: VERSION file is empty"];

/ public api - only the functions intended to be called externally are exported
export:([init;checkpartitiontype;checkenumerabletype;getextrapartitions;getfirstcharpartitions;
getpartchunks;mergebypart;mergebycol;mergehybrid;trackpartition;clearpartsizes;
getpartsizes;syncpartsizes;version;getapimeta])
Loading