
In racket classes, there are really no private methods, right? It’s either a public method defined with define/public
or in (public ...)
or a normal function that can only be called from within the class. Use of send
only works in public methods. Is my understanding correct?

@florence https://plt.eecs.northwestern.edu/pkg-build/server/built/test-fail/cover.txt seems to be a regression from the current release

@pocmatos you can define members whose names are protected by scoping that can be invoked with send by other code that has the names in scope: https://docs.racket-lang.org/reference/createclass.html?q=class#%28part._extnames%29

@samth thanks! I’ll look into it! (It would be nice if a new racket release could trigger a new travis build for cover, so I would get notified of these directly…)

How to get sxml @ symbol within scribble file - I need to define something like this: @(define test '(div (@ (class "something"))))

@lexi.lambda I can try to help reproduce the problem if you’re still having it, is it any package in particular?

@githree use \@
or \|@\|

@bmastenbrook great, both work perfectly fine, thank you

@florence you should request Travis to enable “cron jobs”, so that you can set up weekly or nightly builds. https://docs.travis-ci.com/user/cron-jobs/

@jerryj: Thanks, but I fixed that problem… it was an issue with my network, not Racket. Could I ask you to try something else, though? Does this program work for you? #lang racket
(require net/url net/url-connect)
(parameterize ([current-https-protocol 'secure])
(port->string (get-pure-port (string->url "<https://www.google.com/>"))))

@lexi.lambda It works on my windows machine, I can try it on my mac in ~2 hrs

Ok, cool. I’m specifically interested in Mac OS.

k, i thought i brought my macbook with me to work but apparently I forgot it at home :angry:

@georges-duperon oooh, thanks!

@florence: Since you’re rather more familiar with errortrace than most, do you have any idea what the issue is with my mailing list post about --mode errortrace
?

@lexi.lambda I’ll look into it. (idk what code path —mode errortrace goes through…)

Alright, no worries. I just figured I’d ask if it was something you’d seen before.

@lexi.lambda If i run you example and then raco decompile
main_rkt.zo, it looks like the call to foo
was completely inlined

hence the lack of a stacktrace

@lexi.lambda: For what it’s worth, here’s the error I’m getting on macOS:
ssl-connect: connect failed (error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed)

Of course, using the browser I can access Google, so the problem has to do with Racket.

@florence: Aha, that might explain things! However, in the project I was trying that triggered the mailing list post, I had a much larger program, and I still wasn’t getting a stack trace, so I should try and come up with a larger example that doesn’t get inlined.

@leafac: Yeah, I get the same thing. I seem to be able to access other sites just fine with HTTPS, but for some reason it doesn’t work with Google.

Exactly. If I try other websites, it works.

It might have to do with Google’s recent launch of its own root certificate authority.

It might not have made into Racket’s trusted certificates.

Yeah, though it seems like Racket just defers to the OS certificates, so I’m not sure what’s going on here.

@lexi.lambda I tried to defeat the inliner, and I guess I kinda did…
Seg fault (internal error) at 0x70000bae3f80
zsh: bus error raco setup --mode errortrace --pkgs test-pkg

:D

The inliner is more aggressive than I anticipated. It does sort of seem like it shouldn’t run when --mode errortrace
is specified, but I guess --mode
doesn’t let you control something like that.

@lexi.lambda I think im wrong, its not the inliner. If i decompile without —mode
errortrace the output looks the same

I’m just not seeing errortrace annotations

Aha, so is --mode
a no-op, then?

The docs appear to claim that --mode
should use errortrace/zo-compile
and place the resulting .zo
files in compiled/errortrace/
, but as far as I can tell it definitely doesn’t do the latter.

Interestingly, errortrace/zo-compile
doesn’t use make-errortrace-compile-handler
, but it calls errortrace-annotate
directly. Still seems like it might not be called at all, though.

It seems like maybe --mode
doesn’t work with the parallel build. However, using -j 1
gives me an exciting error when I use --mode errortrace
: /Users/alexis/gits/racket/racket/racket/share/pkgs/errortrace-lib/errortrace/errortrace-lib.rkt:98:20: module: cannot be cross-phase persistent due to required modules
in: (#%plain-module-begin (#%require (for-meta 0 errortrace/errortrace-key)) (#%plain-app init-test-coverage (quote ())) (#%provide (protect alias-of) (protect kw-converted-arguments-variant-of)) (#%declare #:cross-phase-persistent) (define-values (kw-conve...
compilation context...:
/Users/alexis/gits/racket/racket/racket/collects/racket/private/kw-prop-key.rkt
/Users/alexis/gits/racket/racket/racket/collects/syntax/module-reader.rkt
/private/tmp/test-pkg/main.rkt

@lexi.lambda It

‘s weird that errortrace tried to recompile racket…

@florence: Is that errortrace’s fault? Or raco setup
’s?

@lexi.lambda I’m not sure. I know DrRacket does some tricks to stop errortrace from annotating everything in the core, so maybe setup
should implement those? (Its a relatively small change to have errortrace just skip cross phase persistent modules tho).

Well, errortrace probably can’t annotate core things at all, since that would create module cycles.

But I think I misunderstand a little bit how --mode
is supposed to work. Is --mode foo
supposed to completely ignored compiled/
recompile everything, including dependencies, into compiled/foo/
? Or is it supposed to re-use compiled/
for things that aren’t already compiled?

Who would even know the answer to that question? @mflatt?

If it’s the former, then it sounds like the issue is in errortrace. It would need to ignore cross-phase persistent modules and all modules that errortrace itself depends on.

If it’s the latter, then the issue would seem to be in raco setup
.

@lexi.lambda errortrace needs to ignore cross-phase persistent modules, and that’s probably the main problem

errortrace has a special case to not instrument the errortrace-key module to refer to itself, so I don’t think it would create cycles, but I’m not certain

@mflatt: When I was fiddling with things, it seemed to try to instrument syntax/module-reader
, which produced a cycle in the reader, but I was also in a potentially mucked up state with my .zos.

That sounds like a likely extra problem

Alright, well, I’ll open an issue on the errortrace repo about the cross-phase persistent issue first.

Dumb question, but I can’t seem to find documentation on how to give struct members default values. Is there an easy way of doing this?

@recon419 I think they are called “auto fields”. Unfortunately, IIRC, you cannot choose the value dynamically at run-time, the value for (all?) auto fields is fixed when the struct type is created.

I think the best way to do it is really just to create a wrapper procedure that defers to the underlying constructor and supplies the appropriate default values.