# A possible bug in the expander?

**URL:** <https://racket.discourse.group/t/a-possible-bug-in-the-expander/2829>\
**Category:** General\
**Created:** [March 24, 2024, 9:31am UTC](https://racket.discourse.group/t/a-possible-bug-in-the-expander/2829 "2024-03-24T09:31:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominik.pantucek](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dominik.pantucek/32/144_2.png) [@dominik.pantucek](https://racket.discourse.group/u/dominik.pantucek)\
**Post date:** [March 24, 2024, 9:31am UTC](https://racket.discourse.group/t/a-possible-bug-in-the-expander/2829/1 "2024-03-24T09:31:29Z")

</div>

Hello Racketeers,  
while working on new Actor Basic version I stumbled upon a strange behavior. I managed to narrow it down strictly to my rrll-abasic package (not in the package catalog) sources found at [rrll-abasic · master · Dominik Joe Pantůček / rrll · GitLab](https://gitlab.com/racketeer/rrll/-/tree/master/rrll-abasic?ref_type=heads)  
A minimal non-working example with the current version is:

```scheme
#lang s-exp rrll/abasic/standalone

(define (test-actor))

```

The result is:

```scheme
mwe.rkt:3:9: test-actor: unbound identifier
  in: test-actor
  location...:
   mwe.rkt:3:9

```

Here, `define` is just `rename-out` of `define/provide-actor` defined in `rrll-abasic/abasic/expander.rkt` which is pretty innocuous and was like this since long long time ago.  
The error goes away if I remove `space.rkt` from `standalone.rkt` (line 4) and the `(run-steps run)` `rename-out` (line 22) - as it comes from `space.rkt`.  
And yes, I have been working on `space.rkt`lately to provide an external access to the evaluation environment from other threads - I added the last three procedures in that file and updated the `thread` field in `run-actor` (line 177). Just to give a complete picture, I added the fields `thread` and `cmd` to the `%space` struct in `space-struct.rkt` as well.  
Perhaps I am overlooking some simple explanation, by my overall impression is that for some reason the current `space.rkt` "confuses" the Racket expander and I get strange behavior in other code that transitively requires it.  
As a side note - it originally expressed by not evaluating any code so I tried adding some runtime debugging logging and errortrace - but adding errortrace to the `expander.rkt` module resulted in:

```scheme
namespace mismatch: bulk bindings not found in registry for module: #<resolved-module-path:"/home/joe/Projects/Programming/RRLL-NEW/msg.rkt">
  context...:
   /home/joe/racket/collects/syntax/wrap-modbeg.rkt:46:4

```

I will file a bug report if nothing obvious shows up, of course.  
Cheers,  
Dominik
