gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

timer not accessible? #222

Closed KimBruce closed 8 years ago

KimBruce commented 8 years ago

The minigrace "timer" module seems to no longer be accessible. Writing

import "timer" as timer

generates the error message

Please compile module timer before importing it.

I see the stub there in the minigrace/stubs folder and I see the timer.js file in the js subfolder, so I'm not sure what is wrong.

I get the same error message on my Pomona web site as well as on ~black/ide/ at PSU.

I need it for an assignment students start working on tomorrow!!

The strange thing is that animation.grace in the objectdraw repository imports it and seems to work fine, so I suspect this is a very recent change. Of course, if I now try to compile animation.grace it breaks.

Did something just get renamed somewhere?

apblack commented 8 years ago

This is now fixed. It took a while — first gracecode_timer was there, then it wasn’t … It turned out to be present in the foreground process, where you run your animations, but absent from the background process, which is where the compiler runs. Mysterious, because parallel scripts populate both.

If you update to version 3541 (commit 35aef38) all should be well.

Sorry about that. It was a side-effect of automating the import of files into background.js and index.html, the purpose of which was to avoid precisely this kind of problem!