
Stating the obvious: Since documentation comes in forms of programs (scribble files), installing a package brings in all the dependencies used in the documentation. This often includes full racket, graphical libraries etc. The intention is of course to split packages into foo-lib, foo-doc etc, but if you happen to use a package, that weren’t split up, you’ll end up installing quite a bit more than just minimal racket. Apart from shipping pre-rendered documentation (which isn’t simple), I don’t see a solution.

@sorawee Wrt the dynamic linking problem: I think, there is a fair chance, you are running into this issue:
https://stackoverflow.com/questions/35568122/why-isnt-dyld-library-path-being-propagated-here

I suppose you could temporarily turn off “System Integration Protection” to check, that it is indeed this issue.

That’s too scary. I probably won’t do it, but I will post these links in the issue in case it helps whoever looking at the issue.

It is not clear to me, if raco make
should propagate, or whether the dynamic library should use RPATH instead.

In any case, dynamic linking is always tricky.

One workaround that works for me is to avoid DYLD_LIBRARY_PATH
and adjust lib-search-dirs
directly

That sounds like a good solution.

is the subset of HTML supported by the browser
package documented anywhere? (https://docs.racket-lang.org/browser/index.html#%28mod-path._browser%29\|https://docs.racket-lang.org/browser/index.html#%28mod-path._browser%29)

IIUC, that package is severely outdated and it is strong discouraged to use it.

oh damn. thanks @sorawee

It was used for displaying Racket docs several years ago (probably more than ten years), but we now use a proper browser for that.

The list of tags is here: https://github.com/racket/drracket/blob/master/drracket/browser/private/html.rkt#L406
But, yes, use something else.

I see. I’ll go with using the browser myself then :)

Is there a way to instantiate racket/gui
only once across phases? Otherwise, I will get “cannot instantiate `racket/gui/base’ a second time in the same process”.

No. The only thing that realy works is to avoid using racket/gui
anywhere except at phase 0 in the main thread of the main place.

Another solution that would work is to rewrite all the underlying gui libraries on all three platforms to be thread-safe

@suzanne.soy has joined the channel

Thanks! Turns out this is very easy to fix (https://github.com/takikawa/racket-rsvg/pull/8)

@phillip has joined the channel

Hi all. New to Racket and trying to use create-embedding-executable
. When I run my app that was built I get cleanse-path: contract violation
expected: (or/c path-string? path-for-some-system?)
given: '#%embedded:racket/base:
Im struggling how to overcome this.

@phillip I don’t know anything concrete, but OS and version of Racket might be relevant here.

macOS 8.0 CS

I think its something with the bundling. If I do racket myapp.rkt "/path/to/file/to/compile"
it works great

its the raco exe
produced version of my app that blows up

I don’t know for sure - but I think this could be a bug in Racket.
If you have time, wait for someone that knows more. If not, I would try 8.0 BC instead.
Racket has two backends, the traditional BC and a new one CS. Version 8.0 is the first that uses CS, so this might be one of those things, that simply hasn’t been discovered before.

ty. I will try BC

no go with 7.9 BC either. Whats interesting is if you use compiler/embed
it seems to assume you’ll be using it from racket vs a wrapper app. My wrapper app throws: find-exe: can't find Racket executable for variant cs
I ended up hacking the module to hard code the path to my racket file to get things working. Which makes sense, I want to use the base racket
binary as the starting point for a new compilation.
I’m just stuck on the embedded modules not being read properly.

Is there an undocumented caching mechanism for get-pure-port
? I’m doing (port->string (get-pure-port (string->url aurl) #:redirections 10)
#:close? #t)
right before and after updating a raw gist at aurl
, and the second time it returns the same text as the first time, even though my browser displays the update version.

@laurent.orseau Not that I can see. https://github.com/racket/racket/blob/master/racket/collects/net/url.rkt

Thanks. This is weird. This was inside DrRacket (that’s the use case) and even after restarting it’s not updated

Maybe there is a proxy server somewhere? It’s worth trying get-pure-port/headers
with a header, that says “no caching”.

Just tried again now, and the result is the new text. It must be some caching. I’ll try the headers next.

Here is an example of how to call create-embedding-executable
: https://github.com/alex-hhh/ActivityLog2/blob/36a4bb8af45db19cea02e982e22379acb18d0c49/build.rkt#L111

Is there a way to “lift” a binding from phase n
to phase n + 1
, other than requiring for-syntax
?

I’m sorry, I’m having trouble figuring out how to use it so that I can use the binding at a higher phase.

An example, say there is (define fun ...)
, and I’d like to lift fun
so that I can use it in a begin-for-syntax
block.

Hm, it looks like I can take the entire definition form and lift it, but I can’t simply lift the variable.