yeptris 0.6.54.0-aarch64-linux → 0.6.56.1-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6ce5d5e18e39661e1f2dc0dcd4e49955f1970bf02ad2cb9d71971c9b723c0ac
4
- data.tar.gz: 8badf9b17d292969d94ea245c113f888bbd7c1e5f14336ff7a2555977aa75fc3
3
+ metadata.gz: a1b9c2397487fd93e5ef67504a9e7b03c8046fd0746b32f6d7093fab3ffe4742
4
+ data.tar.gz: 69e9235b9b62e3b3d0c094547b00ac7a03c795d9f419bf37335be72590db794d
5
5
  SHA512:
6
- metadata.gz: 1f2a50a420d2efcac626aff20dd83af6d9f132e4a112d542600354cf5639e798bfc9d0aba1cd1f02e88f76b7499855f0e1556d7cff36d46d9390cd35ce2a6f0b
7
- data.tar.gz: 5aa4a9bdee9500c933f77a9d81b0f87f53aa2501106e1efb72ed10c1fea07bf5aa7e5ee510086dfb8261267c3346085839f20061a9e5b386eebb50e5ce520c09
6
+ metadata.gz: 6b580a02e32de473097e36915c3bb79b1c5801ee55ac35e5b66afc98ae3d69c3b87443c7a8d41e9bacc1559e6fa3966bdb0eb1d9032b28ccaa2c2cddbe941617
7
+ data.tar.gz: 9e4f9874b3d6d6e3672202f76f7326b272370846a417d451a5cc8e54131580034d72af99bc877737b4911c7a1c5a5b1921711547dede09d415ff63e8f6e4f608
@@ -11,8 +11,8 @@
11
11
 
12
12
  #define YEPTRIS_VERSION_MAJOR 0
13
13
  #define YEPTRIS_VERSION_MINOR 6
14
- #define YEPTRIS_VERSION_PATCH 54
15
- #define YEPTRIS_VERSION_STRING "0.6.54"
14
+ #define YEPTRIS_VERSION_PATCH 56
15
+ #define YEPTRIS_VERSION_STRING "0.6.56"
16
16
 
17
17
  #ifdef __cplusplus
18
18
  extern "C" {
@@ -320,6 +320,10 @@ module Yeptris
320
320
  target = merge_target.pop
321
321
  merge_into(target, done) if target
322
322
  when DOCUMENT_START
323
+ # anchors are per-document (the engine memo law; PyYAML's
324
+ # composer resets per document): a later document's alias
325
+ # must not resolve into an earlier one's name
326
+ anchors.clear
323
327
  docs.push(nil)
324
328
  end
325
329
  i += FIELDS
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.54.0".freeze
6
+ VERSION = "0.6.56.1".freeze
7
7
 
8
8
  # Informational notices are OPT-IN (yeptris-ruby#217): consumers
9
9
  # embed yeptris inside CLIs that assert clean stderr, and a
data/libyeptris.so CHANGED
Binary file
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(yeptris
6
- VERSION 0.6.54
6
+ VERSION 0.6.56
7
7
  DESCRIPTION "Ultra-fast YAML 1.2 parser, emitter and streamer in C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -105,8 +105,8 @@ typedef struct {
105
105
  uint8_t style;
106
106
  uint8_t flags; /* YEPTRIS_EF_* */
107
107
  uint8_t tag_id; /* resolved implicit tag (YeptrisTagId, resolve.h) —
108
- * the typing SSOT, so hosts never re-scan. Uses the
109
- * struct's pad byte: sizeof stays 36 (ABI-pinned) */
108
+ * the typing SSOT, so hosts never re-scan (the
109
+ * struct is 44B, ABI-pinned; the bindings mirror it) */
110
110
  uint32_t line;
111
111
  uint32_t col;
112
112
  uint32_t end_line; /* #179: libyaml end_mark semantics (see the
@@ -590,6 +590,8 @@ void ytap_sink(yep_ytape* t, yep_sink* sink) {
590
590
  sink->on_scalar = yt_on_scalar;
591
591
  sink->on_block_open = yt_on_block_open;
592
592
  sink->on_block_item = yt_on_block_item;
593
+ sink->compose = 1; /* the tape replays into a DOM: the composer's
594
+ * undefined-alias rejection stays at parse time */
593
595
  }
594
596
 
595
597
  /* ---- replay ---- */
@@ -1107,6 +1107,17 @@ static int e_plain_multiline(yep_engine* e, yep_span s0, uint32_t block_floor, y
1107
1107
  if (s.term == YEP_TERM_COLON) {
1108
1108
  return e_fail(e, YEP_ERR_UNEXPECTED, s.end);
1109
1109
  }
1110
+ if (s.end == s.start && s.term == YEP_TERM_EOL) {
1111
+ /* The continuation line opens with a raw multibyte break
1112
+ * (NEL/LS/PS): scan stopped on it before any content, and
1113
+ * the line-facts kernel (\n/\r law) could not park it as a
1114
+ * blank line. No piece: the break rides the loop's own
1115
+ * tally, so a run of breaks folds to the (n-1) newline law
1116
+ * -- one fold-space per break made "nnn]\n!<"+NEL^2+"NNN"
1117
+ * read "nnn] !< NNN" where libyaml folds "nnn] !<\nNNN"
1118
+ * (the r102 nightly, yeptris#870). */
1119
+ continue;
1120
+ }
1110
1121
  if (e->fold_n >= YEP_MAX_FOLD_LINES) {
1111
1122
  return e_fail(e, YEP_ERR_MEMORY, e->pos);
1112
1123
  }
@@ -1435,13 +1446,22 @@ static int e_alias(yep_engine* e, yep_event* ev) {
1435
1446
  return e_fail(e, YEP_ERR_UNEXPECTED, star);
1436
1447
  }
1437
1448
  uint32_t target = anchor_id_of(e, name);
1438
- if (target == 0 || (target <= e->anchor_serial && e->anchor_placed != NULL &&
1439
- e->anchor_placed[target - 1] == 0)) {
1449
+ /* libyaml's scanner/composer split: the scanner emits the ALIAS
1450
+ * event for ANY name; the composer rejects what it cannot resolve
1451
+ * ("found undefined alias"). Rejecting here unconditionally made
1452
+ * event streams (recorder/pull/push) diverge from libyaml's for
1453
+ * every dangling alias ({?\n:*c }, the nightly's r101), so the
1454
+ * rejection rides the sink's compose bit: document builders (the
1455
+ * DOM, the record tape) keep the parse-time error, event
1456
+ * consumers carry the name for their host's resolution (the ruby
1457
+ * materializer raises; the py loader does since this change too). */
1458
+ if (e->sink != NULL && e->sink->compose &&
1459
+ (target == 0 || (target <= e->anchor_serial && e->anchor_placed != NULL &&
1460
+ e->anchor_placed[target - 1] == 0))) {
1440
1461
  /* undefined, or defined-but-not-yet-placed: the props scan
1441
1462
  * registers the name before the anchor's node reaches the
1442
1463
  * output, so an alias here would precede its definition and
1443
- * the re-parse would reject the document (libyaml: "found
1444
- * undefined alias") */
1464
+ * the re-parse would reject the document */
1445
1465
  e->pos = star;
1446
1466
  return e_fail(e, YEP_ERR_UNDEFINED_ALIAS, star);
1447
1467
  }
@@ -110,6 +110,13 @@ typedef struct yep_sink {
110
110
  int (*on_scalar)(void* ctx, const struct yep_view* value, const struct yep_view* tag,
111
111
  const struct yep_view* anchor, uint32_t anchor_id, uint8_t tag_id,
112
112
  uint8_t style, uint8_t implicit, uint8_t flow, int borrowed);
113
+ /* Document composers (libyaml's scanner/composer split): the
114
+ * scanner emits the ALIAS event for ANY name, while a sink that
115
+ * builds a document rejects an alias whose target is undefined or
116
+ * not yet placed ("found undefined alias"). Set for the DOM and
117
+ * record-tape routes; event consumers (recorder/pull/push) leave
118
+ * it 0 so their streams carry every alias like libyaml's. */
119
+ uint8_t compose;
113
120
  } yep_sink;
114
121
 
115
122
  /* Value facts for on_block_pair (the classified value classes the
@@ -410,7 +410,8 @@ engine_enter:
410
410
  .on_block_pair = dom_on_block_pair,
411
411
  .on_scalar = dom_on_scalar,
412
412
  .on_block_open = dom_on_block_open,
413
- .on_block_item = dom_on_block_item};
413
+ .on_block_item = dom_on_block_item,
414
+ .compose = 1};
414
415
  }
415
416
  int rc = 0;
416
417
  if (have_tape && !norm_kept_raw && ytap_flow_rooted(&yt) == 0) {
@@ -248,7 +248,8 @@ YEPTRIS_API YeptrisStatus yeptris_schema_load(const char* source, size_t len, Ye
248
248
  .on_block_pair = dom_on_block_pair,
249
249
  .on_scalar = dom_on_scalar,
250
250
  .on_block_open = dom_on_block_open,
251
- .on_block_item = dom_on_block_item};
251
+ .on_block_item = dom_on_block_item,
252
+ .compose = 1};
252
253
  if (eng == NULL || dom == NULL) {
253
254
  st = YEPTRIS_ERROR_MEMORY;
254
255
  goto out;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.54.0
4
+ version: 0.6.56.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-01 00:00:00.000000000 Z
11
+ date: 2026-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi