Commit Graph

27 Commits

Author SHA1 Message Date
Robby Findler
e6888828b5 adjust online compilation so that the stack trace attached to an exception
is available by clicking the "Copy" menu item in the bottom bar
2013-04-26 10:26:12 -05:00
Robby Findler
e12a685107 adjust drracket's online expansion machinery to track exns that are
passed to the error-display-handler during expansion

(not just the exn records that actually get raised)

the motivation is to do a better job with TR's way of signalling
mutiple error messages.
2013-04-21 10:16:07 -05:00
Matthew Flatt
6fe2861877 DrRacket: if any file in package X is open, treat X as "in development"
... for the purpose of "populate 'compiled' directories" --- but only if
the user has write permission for the package directory.

This change may or may not be a good idea. The idea is that installed
packages generally should be treated in the same way as the main
"collects" tree (e.g., avoiding debugging instrumentation), but if you
happen to be developing a package, then you want it treated like things
that are not in the main "collects" tree. So, how do you pick? Maybe
opening a file in the package is a good way to pick.
2013-04-16 12:51:54 -06:00
Robby Findler
7b0608ca42 fix a leak in DrRacket
It was leaking threads at about the rate of 2 per online expansion
that had a syntax error (or otherwise aborted without finishing
expansion)
2013-03-24 18:03:33 -05:00
Robby Findler
5937bcbbf5 fix a race-condition 2013-03-24 17:05:50 -05:00
Robby Findler
79b5e4dc3a fix a bug that inhibited online compilation from writing out .zo files
when it compiles required files

Now that this is fixed, the compilation manager will be (once again)
active when doing online compilation, so if the "Populate compiled
directories" checkbox is check (which it is by default) in the details
section of the language dialog, then online compilation will, as it
compiles your file, write out .zo files that will also be used by the
Run button.

The actual fix to this bug is the change in expanding-place.rkt (and
all it really does is move the setting of the
current-load/use-compiled and current-load parameters earlier so that
CM sees only the modified parameter settings and so doesn't give up on
compilation.

The rest of the changes are a test case (and change to drracket to
support the test case)
2013-03-14 16:36:51 -05:00
Robby Findler
007d18d145 properly handle eof in the online expansion code
It used to just kind of give up processing which, from the outside,
watching looked like

  (begin-for-syntax (custodian-shutdown-all (current-custodian)))

and so fell into that case in the code. Now, by explicitly raising
an exception, we get a more accurate response
2013-03-05 22:39:34 -06:00
Robby Findler
c8a1ec8c9c fix bug in online check syntax's save file notification
Before this commit, the files that are loaded during expansion
were discarded when an error during expansion occurs. This commit
saves them: unless the program is something like

  (begin-for-syntax (kill-thread (current-thread)))

the handling that deals with that kind of situation (as opposed
to just an exception being raised) doesn't try to save them

Do not merge to 5.3.2: this bug isn't serious and the new code
is not as well tested as the old
2013-01-15 09:07:42 -06:00
Robby Findler
200ec130a0 drracket's online compilation now tracks files loaded during expansion
use these files to determine if a file is dirty (and thus needs
to be recompiled) when another file is saved.

closes PR 13307
2012-12-21 21:20:23 -06:00
Robby Findler
938959611e rework online compilation's internals
Things should now generally be set up to work better --
for example online check syntax is smarter now about
what happens when switching tabs/frames and this also
makes it easier to add new ways for a window to become
dirty (that is, for it to be known that it needs to
be recompiled)
2012-12-19 10:50:01 -06:00
Robby Findler
97454b6e55 guard use of exn-message
closes PR 13316
2012-11-28 13:17:41 -06:00
Robby Findler
7ffe9f2612 adjust logger to use a name instead of an environment variable 2012-10-15 13:25:17 -05:00
Robby Findler
0ec7f47339 adjust background compilation log messages so they only appear
when the PLTDRBACKGROUNDCOMPILELOG environment variable is set
(since things seem stable now)
2012-10-15 12:32:46 -05:00
Robby Findler
afc2faf651 redirect compile-time io during online check syntax into the warning log
closes PR 13036
2012-08-16 19:16:57 -05:00
Robby Findler
a0ef78e97b adjust online check syntax to try to fix a bug where renaming information
can get "stale" and cause DrRacket to deadlock (this commit just sets
up some stuff to make one fix possible, but that fix doesn't seem to
be working, so the actual fix is disabled (see comment in commit))
2012-01-31 21:11:16 -06:00
Robby Findler
25271be3e8 set the current-load-relative-directory to #f (initially) in drracket 2011-11-28 13:57:11 -06:00
Robby Findler
153dd73f6b adjust drracket to clean up the code that sets the initial value of
current-directory and current-load-relative-directory and to make
current-directory's initial value be the user's home directory
2011-11-28 13:29:55 -06:00
Robby Findler
41b8b8142a adjust the colors of the little dot for online check syntax so it
is more informative (one more stage) and it turns green when online
check syntax is finished (instead of being blank in that case)
2011-10-25 16:16:22 -05:00
Robby Findler
13e16d2b12 add preferences for displaying error messages from online expansion
also improved the highlighting in the margin by invalidating only the region
of the editor that actually needs redrawing
2011-09-20 17:15:04 -05:00
Robby Findler
566db80842 add more info into the log for the expanding place
specifically, when drracket kills the thread that is expanding/transforming
the program, first print out its stack trace. that way, if it is stuck
somewhere, maybe we'll get a clue as to where
2011-09-12 10:49:17 -05:00
Robby Findler
b43250a448 remove unnecessary thread creation & remove commented out code 2011-09-12 10:49:16 -05:00
Robby Findler
273afb266d adjust online expansion to hold onto previously successful
namespace-module-registry in order to encourage the bytecode cache to
hold onto likely-to-be-useful entries a while longer
2011-09-11 08:15:46 -05:00
Robby Findler
fd5019ddea added one more log line 2011-08-31 20:26:31 -05:00
Robby Findler
61aaf584c5 adjust the threading protocol for compilings files to be kill safe 2011-08-30 07:59:33 -05:00
Robby Findler
64067efb04 adjust the online check syntax so that you get a subtle indication of read errors instead of just silence 2011-08-28 12:30:41 -05:00
Robby Findler
eeb79e0e48 add more detail to the hopefully-help-me-debug log messages that drracket reports about the online check syntax bug 2011-08-05 21:39:35 -05:00
Robby Findler
b972a0940d Added online expansion and compilation of files
being edited in DrRacket (via places)

Added an API to let tools have access to that
  information (and compute more stuff)

Used that to make an online version of Check Syntax
  which led to a separately callable Check Syntax API.
2011-08-02 16:28:16 -05:00