jade-lang 0.11.0 → 0.11.2

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: b73668e7e5ab3a62df195d2f978ffcba2ef69e3a2e578eb084ab56dccfe0770f
4
- data.tar.gz: 6d7420d31cf750127e51ad9191ac068231e92b041779ef4927d0e6feea26fd2f
3
+ metadata.gz: 8e5a1b96ecfb6952330c6dcb8bd01b6994b0ca8cff936a59112d5c9606412bd4
4
+ data.tar.gz: 066f030bb094a9d73b17acb2754f59aed7fc1bb3204e2f68be0df5e2830ad037
5
5
  SHA512:
6
- metadata.gz: 0036c6f868f892ff83938bfbf5eda69531d4a4fa11aa1abd27978efafddc936bb64320acd6a181caa0b2f55cccb70957c9ba80aad833584857a4b51dc1083ed1
7
- data.tar.gz: 95940e59148590400e15d252ed8bbb4a7a6b67cd3febbc481a8b176fbb373afd2e20069e3a91541af52aafbf510baa6d1c9fb3f5cd2277b76adaff07015a75e8
6
+ metadata.gz: b1c1f5397cfab8dafce1c63ee630c7032995be651c0ea2fcb7af51e2cff134a0f8b94c21897f53cf561c5106906c56c2267f2275d57ba6e42d6a6e7b013d003d
7
+ data.tar.gz: b29cbd43c8125fa086563761c9935cd3cf207ad0d10749fe701c129d0660023323698cead0c48d3bea559ee27b31441fa41c00f6697725a634c326f23777f771
data/CHANGELOG.md CHANGED
@@ -4,6 +4,34 @@ All notable changes to this project are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.11.2] - 2026-09-15
8
+
9
+ ### Fixed
10
+
11
+ - **A constraint raised inside a field access reached nothing.**
12
+ `RecordAccess` built its result from the expected type alone, so whatever
13
+ the target raised was dropped at the dot. A function whose body is
14
+ `to_sel(q).cols` therefore recorded no constraint of its own: it took no
15
+ dictionary parameter, and the interface call inside it fell through to
16
+ `Runtime.impl_for`, which keys on the argument's own class. That dispatches
17
+ on `Q` when the interface is over the `c` inside it, and fails at the first
18
+ call — at run time, though both the types and the call sites were settled
19
+ when it compiled.
20
+
21
+ Deleting the `.cols` from the same program made it work, which is the
22
+ asymmetry that gave it away. It matters wherever an interface is over a type
23
+ a struct holds rather than the struct itself.
24
+
25
+ ## [0.11.1] - 2026-09-15
26
+
27
+ ### Added
28
+
29
+ - **A `:call` check sees what the call returns.** `Extensions::CallContext`
30
+ carried the argument types and not the result, so a check on a function
31
+ whose interesting type is the shape the caller asked for had nothing to
32
+ read. jade-sql needs it to compare a read's result against the table's
33
+ columns, the way it already compares a write's.
34
+
7
35
  ## [0.11.0] - 2026-09-15
8
36
 
9
37
  ### Added
@@ -45,13 +45,18 @@ module Jade
45
45
 
46
46
  # The node travels with the types because a literal's value — a SQL string,
47
47
  # a constant predicate — is not in them.
48
- CallContext = Data.define(:name, :arg_types, :node, :registry, :entry_name, :span)
48
+ # `return_type` is what the call produces, which a check needs when the
49
+ # thing being checked is the shape the caller asked for rather than
50
+ # something it passed in. Still a variable when nothing has pinned it.
51
+ CallContext = Data.define(
52
+ :name, :arg_types, :return_type, :node, :registry, :entry_name, :span
53
+ )
49
54
 
50
- def check_call(name, arg_types, node, registry, entry_name, span)
55
+ def check_call(name, arg_types, return_type, node, registry, entry_name, span)
51
56
  call_checks[name].then do |watching|
52
57
  next [] if watching.nil?
53
58
 
54
- CallContext[name, arg_types, node, registry, entry_name, span]
59
+ CallContext[name, arg_types, return_type, node, registry, entry_name, span]
55
60
  .then { |ctx| watching.flat_map { it.check(ctx) } }
56
61
  end
57
62
  end
@@ -107,6 +107,7 @@ module Jade
107
107
  column_errors = Extensions.check_call(
108
108
  callee_name(callee),
109
109
  args_acc.types.map { st.env.substitution.apply(it) },
110
+ st.env.substitution.apply(result_type),
110
111
  node,
111
112
  registry,
112
113
  st.env.entry_name,
@@ -24,7 +24,7 @@ module Jade
24
24
  )
25
25
  end
26
26
 
27
- Result.init(expected_.type)
27
+ Result.init(expected_.type, target_result.constraints)
28
28
  .then { it.apply(after_state.env.substitution) }
29
29
  .then { [after_state, it] }
30
30
  end
data/lib/jade/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jade
2
- VERSION = '0.11.0'
2
+ VERSION = '0.11.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jade-lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Cornu