Repository navigation
hy-check+hy-emit — model curated time.time value-method surface (fixes #3933) - #3988
Yumihariii wants to merge 1 commit into
Conversation
57dec2d to
50c9b01
Compare
|
Rebased onto current main (67365d1) after #3924/#3927/#3929/#3932/#3935/#3944/#3902/#3904 landed — the const-block collisions in Re-verified on the merge tree with warm cache: One note for the DUP call: #2764 and #3012 fill the |
50c9b01 to
cd89e95
Compare
|
Rebased onto patch-id Gate (fresh target dir): Status vs the alternate PR on #3933: #3989 is still CONFLICTING with no push since 08:23Z. Ours covers both halves — the hy-check value-method surface and the hy-emit SHAPES table — with tests on each side, per the issue's acceptance criteria. |
cd89e95 to
c304934
Compare
|
Rebased onto 0c1a9cd, patch-id identical to cd89e95, zero conflicts (foreign.rs and hy-emit shapes.rs untouched by the last sessions). Merged-tree gate green: foreign_method_surface 15/15, time_time_value_methods_3933 2/2, hy-check --lib 183, hy-emit --lib 193. The curated foreign-surface waves (#3922–#3944) landed other packages but never time.time, so HYB-E1002 still waves through fake time.time methods on current main — the fix remains needed. |
c304934 to
0a4e7e4
Compare
|
Rebased onto latest Gate after rebase: For context ahead of a DUP pass: the two fresh issues on the same table family ( |
0a4e7e4 to
f3a3718
Compare
|
Branch updated to main |
f3a3718 to
066a802
Compare
|
Rebased onto current main ( Re-ran the gates on the rebased tree:
No semantic change from the previous head, so the #3933 repro (phantom One control note for the red |
|
Heads-up on the compiler run on this head (066a802): quick ✅, preflight ✅, compiler ❌ — every failing path is under examples/*, none of which this PR touches. Facts:
|
066a802 to
e8002d6
Compare
|
Branch updated as the board asked: rebased onto 94b0e14, patch-id byte-identical to the head that CI previously ran green — zero content drift. Gates on the new base: foreign_method_surface 15/15, time_time_value_methods_3933 2/2, hy-check lib 183/183. Heads-up before verification: the compiler job's MVP-0 examples e2e currently fails on every PR based on main (root cause and evidence in my note above, tracked by #4236); quick and offline pass on this head. |
fixes #3933
hy-check(foreign)gates method calls on curated handles against a pinned surface, buttime.timehad no arm —s.t.totally_fake()passedhyb checkand only died later ingo build. This fills the missing half of GUARANTEES row 13 for time.Time values: checker surface + emitter lowering, kept in lockstep.Checker (
hy-check/src/foreign.rs)TIME_TIMEsurface: the 28 single-return value methods the issue enumerates. Match arm covers value and pointer receivers, both the hy lowercase spelling and Go's capitalized one (time.time | time.Time).method_resultdescriptors so chains stay inside the surface:add/add_date/round/truncate/utc/local/in→time.time,sub→time.duration(chains into the existing duration table),format/string→Str, predicates and scalar getters →Primitive.Date,Clock,ISOWeek,Zone,ZoneBounds) stay rejected on both sides — Hybrid has no multi-value method lowering yet, so emitting them would reproduce the same go-build failure in a new place.Emitter (
hy-emit/src/shapes.rs)time.timeSHAPESentry was an empty member table; it's now the exact Go spellings for those 28 methods (checker ⊆ emitter ⊆ Go, same contract assync.mutex).method, notmethod0: these are called with parens in hy (s.t.year()), and amethod0entry makesemit_callappend a second paren pair (s.t.Year()()— invalid Go). The emitter regression tests pin that.Tests
hy-check/tests/foreign_method_surface.rs: phantom rejection, real-method acceptance incl.utc().unix()chains, pointer/capitalized receivers, multi-return methods deliberately staying rejected.hy-emit/tests/time_time_value_methods_3933.rs(new): exact Go spelling pins + a no-()()emission guard.Verified against current main (e229ea7): with these tests on bare main the gate is red — checker 3/15 fail, emitter 2/2 fail (lowercase
s.t.year()emitted verbatim). On this branch the fullhy-check+hy-emitsuites pass (431 test groups, 0 failures), and fmt drift is unchanged from main per file.Related note for triage: #2764/#3012 also fill the emitter-side time.time table but predate this issue and only do half the contract (shapes without the checker arm); this PR pins both sides to the issue's list.