github2-x
2018-11-30 13:57:20

samth
2018-11-30 14:44:43

@cadr I found the bug


github2-x
2018-11-30 14:45:42

github2-x
2018-11-30 14:48:03

cadr
2018-11-30 14:49:41

Awesome!


github2-x
2018-11-30 15:26:53

github2-x
2018-11-30 15:26:53

github2-x
2018-11-30 15:52:58

github2-x
2018-11-30 16:03:03

github2-x
2018-11-30 16:28:17

samth
2018-11-30 16:50:06

@cadr also i figured out what went wrong with uncaught-exception-handler


samth
2018-11-30 16:50:24

the compiled code (but not the source code) has a reference to all the exports


github2-x
2018-11-30 17:14:13

github2-x
2018-11-30 17:14:14

github2-x
2018-11-30 18:06:28

github2-x
2018-11-30 18:13:59

samth
2018-11-30 18:34:42

@cadr also note that the error message prints twice, which is something wrong with exception handling


cadr
2018-11-30 18:35:11

@samth Yeah I noticed that


cadr
2018-11-30 18:40:45

@samth yeah it’s about struct property predicates, provide-pre-transformer? produces #f for contract-out which is a ppt (which totally is a provide-pre-transformer?), trying to fix now


samth
2018-11-30 19:19:37

even ppt? produces #f which is very odd


github2-x
2018-11-30 23:49:22

cadr
2018-12-1 01:13:23

@samth doing it twice thing seems to be happening because of the submodule handling code : https://github.com/pycket/pycket/blob/6a8d15ab71b259f15390c6c4536a4717c1ae941d/pycket/racket_entry.py#L200


cadr
2018-12-1 01:15:01

With this namespace-require call it evaluates everything until the contract error, and then in the module-declared? call it goes through it again and we get a second contract error


samth
2018-12-1 01:20:10

That’s the same code as in the chez main.sps


samth
2018-12-1 01:20:25

Really it should just error at that point


samth
2018-12-1 01:43:04

also the module-declared? call shouldn’t actually evaluate anything


samth
2018-12-1 01:43:20

but also that doesn’t explain why we get the error in the first place


cadr
2018-12-1 01:56:31

Yeah I’m surprised that module-declared? evaluates things too


cadr
2018-12-1 02:00:00

One of the deficiencies of using the call_interpret is the error handling, when we get an error during a call_interpret, it’s converted to an exn and handed to the default handler and that just displays the error and calls the void function, and because that the current continuation is aborted, a Done exception is raised by the NilCont, so the initial call_interpret just returns with void


cadr
2018-12-1 02:03:13

Also yeah it turns out doing it twice is not related to our contract error as I hypothesized before


samth
2018-12-1 02:32:21

But also we should fix call_interpret to raise the resulting exception


cadr
2018-12-1 02:39:48

That would require customizing the default handler because the call_interpret doesn’t even see the raised exception, when it’s raised the default handler handles it and the evaluation continues with a void plugged in to the rolled back continuation (which is usually a NilCont, raising a Done exception)


samth
2018-12-1 02:41:57

right, but in basically no case do we want the current behavior


cadr
2018-12-1 02:43:30

I totally agree, I’ll improve that setup soon


samth
2018-12-1 02:49:18

Another possibility is to just set the initial continuation to do the right thing in call_interprtt


cadr
2018-12-1 02:59:05

That’s what I had in mind, I’ll try to push a fix for that tonight