Editing component being compiled when compilation failed.
budden73 at gmail.com
Wed Jul 8 21:40:51 UTC 2015
Thanks for valuable comments.
Take a look at latest commit:
Most of dead code is deleted.
>It looks like what you are building is an
>extension to ASDF that hooks it into an editor (perhaps specifically the
>lispworks IDE?). Is that correct?
I've done a patch. decorate-function and decorate-macro are used
to apply patches to some parts of asdf.
I use lispworks-tools in Lispworks IDE and swank in SBCL. It is very likely
that the code will work in SLIME for every lisp implementation, but I
didn't test it.
>> Also, you might want to split this into modifications/extensions to ASDF
>> and code that interfaces to the Lispworks IDE.
Maybe. This is just a proof of concept. If it can be accepted to
master branch of asdf,
I'll try to rework it as needed. If not, I can use it as is.
> * It is very poor taste to use special variables and redefine
> functions to access the current component.
Maybe, but my design goals were:
1. Minimum effort.
2. Maximum portability.
3. Minimum code impact so that I can support
the tool if it is not accepted into core of asdf.
Extracting data from error condition seem to be more complex and
non-portable. First of all, I know no portable way to access debugger stack.
SWANK might help, but task can be rather complicated.
> add a restart that doesn't even do the editing for you when
> it could, why don't you define a handler that adds a restart and re-signals?
What I've done is not so stupid. When we want to edit, re-signalling
In fact we need context-dependent debugger command in this case, not a
handler or restart.
But there is no cross-implementation way to add debugger commands.
Also we can't alter "help" command in a debugger so that we could inform
the user of an existence of our "edit" command.
Fake restart is just a portable approximation to this desired behaviour.
Maybe I should also issue a warning on the restart like
"This restart does nothing. Please read the restart's message".
> is not possible, it might make sense to add a restart to ASDF itself,
> which would actually call the editor instead of hint at it, and where
> the editor, not the component, is the special variable that the user
> can thereby customize.
Maybe adding some hook for editing is a good idea. But again, we can discuss it
only if we discuss embedding such a tool into asdf itself. What I have
now is sufficient for me.
> * Do NOT use keywordize and string-equal, use coerce-name and string=.
> You're introducing subtle incompatibility in your semantics.
Ok, I changed code of of-system. For M-. symbol seem to be necessary
is the best thing I can do. Any other ideas?
> * I don't see why ASDF needs a special recognition for a package-file;
> there is no way whatsoever that this is useful, and not every system
> is organized this way, anyway. By contrast, see
package-file and of-system are irrelevant for current discussion, we can just
ignore them for now. I didn't planned to "advertise" them,
I simply keep all asdf-related stuff in one file :)
More information about the asdf-devel