expressir 2.4.64 → 2.4.65

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: e59a0ad2c89ffedec981b58cdfd5306091f4077b09f079cf3c4171fda74db78c
4
- data.tar.gz: 19de4b36ecd8045df80e025c0f00592ceda95673fd80a15f2ee2745c39084587
3
+ metadata.gz: b99726a3a4b9e12cd568a109ae7b690649c13668449729b1b7fc528183efdc20
4
+ data.tar.gz: 6b39aa8bffd2204669c98627a204ec0a973202d34ef32509a245deb71995f819
5
5
  SHA512:
6
- metadata.gz: ab2a3e695d4913149bb6f7d00717e562f139f43dd46d232fe63b958f11af74fb01520640d7896615789b785429128d235045da69afcb3bd4b74b238f2bd598ea
7
- data.tar.gz: b42b3cdab3bda4ac9ce6fa9645d42a41436591036d85b60f7e18a03e2fdbe8752750a7df1bfd3ba3a9f8cea77a0fb76884362b2aadec968ff0f2d5ddcf54df96
6
+ metadata.gz: 617c1e1f3271128cd2c7eac0dd8f26f2a9c49964af7fdb1f3fe06f63592d5174c42861044b310aeee10db4a67a9b9495349520e3f742f374a6cdaa07dbf364e5
7
+ data.tar.gz: 8d423850c4c866f1c389c7f01eb9bc733e630e1f87ae8925a75fd14ffae4d6f56666e6d7f7b8577e89f85de7f1c76a43012aa57805e1e5a683fd1f790d5239d9
@@ -13,7 +13,7 @@ magnus = { version = "0.9" }
13
13
  # Pinned core release (M1, TODO.parity-ee/19): the ext never floats
14
14
  # main — bump the tag per expressir release, alongside the validation
15
15
  # run that pins it.
16
- expressir-rs = { git = "https://github.com/lutaml/expressir-rs", tag = "v0.1.34" }
16
+ expressir-rs = { git = "https://github.com/lutaml/expressir-rs", tag = "v0.1.35" }
17
17
  serde_json = "1.0"
18
18
 
19
19
 
@@ -13,27 +13,23 @@ module Expressir
13
13
  # The tag form follows the owner: items in rule contexts
14
14
  # (WHERE/UNIQUE/IP) historically carry bare tags
15
15
  # (`--"unusual_placement" text`), WG12-style items carry the
16
- # schema-relative path. node.path is rooted at the ExpFile,
17
- # whose id is the file path — drop that leading segment
18
- # (expressir#603).
16
+ # schema-relative path. A referable `__note:id` has no rule to
17
+ # anchor it in a bare tail tag (it would reattach to the
18
+ # schema), so it carries the path too (annotated-express#103).
19
19
  rule_context = node.parent.is_a?(Model::Declarations::WhereRule) ||
20
20
  node.parent.is_a?(Model::Declarations::UniqueRule) ||
21
21
  node.parent.is_a?(Model::Declarations::InformalPropositionRule)
22
- if rule_context
23
- tag = node.id.to_s
24
- else
25
- tag = node.path.to_s
26
- root = node
27
- root = root.parent while root.respond_to?(:parent) && root.parent
28
- prefix = "#{root.id}." if root.respond_to?(:id) && root.id
29
- tag = tag.delete_prefix(prefix) if prefix && tag.start_with?(prefix)
30
- end
22
+ tag = if rule_context && !node.id.to_s.start_with?("__")
23
+ node.id.to_s
24
+ else
25
+ schema_relative_path(node)
26
+ end
31
27
 
32
28
  # Remark items are WG12 annotation blocks: the embedded form,
33
29
  # a block per remark, matching the source convention of the
34
30
  # annotated corpora (the conservation pairs are embedded, so
35
31
  # tail-form emission reads as phantom gains). Rule-context
36
- # owners keep the historic bare-tag tail form.
32
+ # owners keep the historic tail form.
37
33
  if rule_context
38
34
  return node.remarks
39
35
  .map { |remark| "--\"#{tag}\" #{remark}" }
@@ -48,6 +44,17 @@ module Expressir
48
44
  end
49
45
  end.join("\n")
50
46
  end
47
+
48
+ private
49
+
50
+ # node.path is rooted at the ExpFile, whose id is the file path
51
+ # or nil; drop that leading segment (expressir#603).
52
+ def schema_relative_path(node)
53
+ root = node
54
+ root = root.parent while root.respond_to?(:parent) && root.parent
55
+ prefix = root.respond_to?(:id) ? "#{root.id}." : ""
56
+ node.path.to_s.delete_prefix(prefix)
57
+ end
51
58
  end
52
59
  end
53
60
  end
@@ -3,6 +3,6 @@ module Expressir
3
3
  # autoload it (Ruby autoload only works for module/class constants, not
4
4
  # for string constants like `Expressir::VERSION`).
5
5
  module Version
6
- VERSION = "2.4.64".freeze
6
+ VERSION = "2.4.65".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.64
4
+ version: 2.4.65
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-10 00:00:00.000000000 Z
11
+ date: 2026-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys