Skip to content

Filterx movable refs#876

Merged
MrAnno merged 8 commits intoaxoflow:mainfrom
bazsi:filterx-movable-refs
Feb 12, 2026
Merged

Filterx movable refs#876
MrAnno merged 8 commits intoaxoflow:mainfrom
bazsi:filterx-movable-refs

Conversation

@bazsi
Copy link
Member

@bazsi bazsi commented Dec 7, 2025

This PR implements move() as a syntax as well as the backing code to handle "floating" FilterXRef references.

An example config:

@version: current

log {
  source { stdin(); };

  filterx {
    d = {"foo":"foovalue", "bar":"barvalue"};
    d2 = {"foo":"foovalue", "bar":"barvalue"};

    d2.d = move(d);
  };
};

This basically unsets the d variable and moves it in its entirety into d2, avoiding a copy (and copy-on-write as well!).

NOTE: This contains some of the same object-dict refactoring patches as #869, whichever goes in first, this works. They can also be dropped using a rebase, or we can merge those separately by extracting them into their own PR.

@bazsi bazsi force-pushed the filterx-movable-refs branch from bcfc36a to f36a71d Compare December 8, 2025 06:59
@bazsi bazsi force-pushed the filterx-movable-refs branch from f36a71d to 1fafa82 Compare December 29, 2025 12:12
@bazsi bazsi changed the title Filterx movable refs WIP: Filterx movable refs Dec 29, 2025
@bazsi bazsi force-pushed the filterx-movable-refs branch from 1fafa82 to 00ff085 Compare December 29, 2025 20:52
@bazsi bazsi changed the title WIP: Filterx movable refs Filterx movable refs Dec 29, 2025
@bazsi bazsi force-pushed the filterx-movable-refs branch 3 times, most recently from 3aec442 to 810d6f8 Compare January 30, 2026 08:02
@MrAnno MrAnno self-requested a review February 2, 2026 10:36
Instead of naming xrefs floating by convention, make it explicit with a flag
and associated functions.

xrefs can be floated using `filterx_ref_float()` and grounded using
`filterx_ref_ground()`.

Once an xref is floating, it can be converted into a grounded xref without
doing a clone operation.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
@bazsi bazsi force-pushed the filterx-movable-refs branch from 810d6f8 to 4217ea7 Compare February 10, 2026 13:54
@MrAnno MrAnno merged commit 2493f7b into axoflow:main Feb 12, 2026
22 checks passed
fekete-robert pushed a commit to axoflow/axosyslog-core-docs that referenced this pull request Feb 17, 2026
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