Arc Forumnew | comments | leaders | submitlogin
3 points by Pauan 3114 days ago | link | parent

That sounds super strange. From what I understand, Racket automatically caches modules, so they are only loaded once.

But then again, Racket does have multiple phases, so it's possible that it's loading the "compiler" file in two different phases, causing duplicate variable definitions.

In addition, Racket doesn't allow for mutually recursive modules, but Arc/Nu is using "namespace-require", which apparently bypasses that restriction. It's possible that there is a race condition that is causing the "arc/3.1/main" file to be loaded before the "compiler" file is finished loading, which then triggers a second load of the "compiler" file.

Just to clarify: have you tried inserting a "displayln" in the "compiler" file to verify that it is being loaded twice?



4 points by rocketnia 3113 days ago | link

That is exactly how I determined it was being loaded twice.

I was meaning to try on other versions of Racket but I've gotten distracted.

-----

3 points by Pauan 3106 days ago | link

Okay, I just tried upgrading to Racket 6.5, but it still works correctly for me.

I wonder if it's a bug with the Windows version of Racket?

-----