Skip to content

Fixing. Registry Reimplementation. #7

Merged
SerhiiRI merged 6 commits intomainfrom
feat-registry-redesign
Mar 11, 2026
Merged

Fixing. Registry Reimplementation. #7
SerhiiRI merged 6 commits intomainfrom
feat-registry-redesign

Conversation

@SerhiiRI
Copy link
Copy Markdown
Contributor

@SerhiiRI SerhiiRI commented Mar 7, 2026

From the user-perspective

Removed build-compiler
in future releases we'll replace compiler onto the advanced patch system which will be based on Reversed DAG structure passed in secondary time runned execute.

Registry
Registry is now a map-based structure ({:type spec, ...}) instead of a plain vector. registry-create accepts both formats:

;; vector — order = scan priority
(registry-create [from-spec fn-spec])
;; map — explicit keys
(registry-create {:commando/from from-spec, :commando/fn fn-spec})

registry-create support optional key :registry-order in which you may specify in which order need find-command parse items. (Needed in future features). If the user set only two of 5-th used in registry, it mean that explicitely declareted are going first and other just after(and order doesn't metter)
Built registry can be modified with registry-assoc / registry-dissoc without rebuilding from scratch.

From architecture perspective

how registry has been processed before? we took the registry -> injecting internal cmds -> parsing -> ...executing... -> remove external commands from registry. Work practicaly the same but take a look at the current registry structure:

{:registry           {:commando/from {} ...}
 :registry-order     [:commando/from]
 :registry-validated 1772923734358
 :registry-hash      -2017569654}

before passing this registry the parsing procedure we not extending :registy, instead we adding key :registry-runtime which contains _map,_values,_vec at the end of vector. After the execution is done, we removing :registry-runtime.

@SerhiiRI SerhiiRI requested a review from Kaspazza March 7, 2026 22:51
@SerhiiRI SerhiiRI self-assigned this Mar 7, 2026
@SerhiiRI SerhiiRI changed the base branch from main to feat-anchor-patch-print March 7, 2026 23:56
- REMOVED build-compiler. Will be introduced other options to optimize
secondary execution procedure.
- ADDED Registry. To already built registry user can attach/remove
additional CommandMapSpecs
- RENAMED Core, function `create-registry` onto `registry-create`
- ADDED Registry Tests.
@SerhiiRI SerhiiRI force-pushed the feat-registry-redesign branch from 01b532d to 60232a6 Compare March 9, 2026 16:14
Copy link
Copy Markdown
Contributor

@Kaspazza Kaspazza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good changes, never liked the build compiler!

(if (:valid? validation)
(let [ordered-keys (compute-registry-order specs-map (:registry-order opts))]
{:registry specs-map
:registry-order ordered-keys
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on whatsapp, let's stay with vector

Base automatically changed from feat-anchor-patch-print to main March 11, 2026 16:15
@SerhiiRI SerhiiRI merged commit be5fa22 into main Mar 11, 2026
@SerhiiRI SerhiiRI deleted the feat-registry-redesign branch March 11, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants