Multi-file semantic analysis still requires too much manual labor. Adding error markers to external files affected by local changes is currently only possible by returning them from the “observer” strategy. A better approach may be to return a list of affected files, letting the IDE schedule their re-analysis. This way the local analysis can just identify that there are external errors based on signatures, and doesn’t have to bother with reparsing etc. This also ensures better responsiveness by directly showing local errors.

(see Spoofax/23: Add better support for multi-file code generation)

(see Spoofax/179: Add primitives for enqueueing background transformations)

( depends on  see Spoofax/12: Support reference resolving across different files in the Stratego editor)

(related to Spoofax/224: Automatically re-analyze files even if editor not open)

Submitted by Lennart Kats on 26 February 2010 at 13:58

On 13 March 2010 at 16:37 Lennart Kats commented:

I think there should be a strategy in editor-common to enqueue other files for analysis. This should also be used when files have just been refreshed. The queue should take care not to run into a loop.


On 23 April 2010 at 14:10 Nathan Bruning commented:

Lennart, what’s your priority for this issue? Would be great to implement this in the WebDSL editor.

Returning a list of (possibly) affected files seems like a good idea. For the background error checking, it is possible just to return ‘file has errors’ or ‘file has no errors’; the location of the errors is not interesting if the file is not open. This might save some parse time?

Not sure why this depends on Spoofax/12 ?


On 23 April 2010 at 20:51 Lennart Kats commented:

@Nathan:

I changed the “depends on” to a “see”; you’re right there’s no direct requirement for Spoofax/12 to be fixed first. You also make a good point about the background error checking, that could be a nice optimization. Of course, when an editor for an external file is actually open, you do want to do precise error reporting there. I don’t suppose you have any good ideas for how to design the Stratego interface for that?

As for priority, that mostly depends on having a good use case/demand for it. We can definitely make it work if you want to use this in the WebDSL editor :)


On 19 May 2011 at 10:57 Adil Akhter tagged !adil

On 14 September 2011 at 16:40 Tobi Vollebregt tagged !tvo

On 23 November 2011 at 13:01 Lennart Kats tagged 0.61

On 23 November 2011 at 13:02 Lennart Kats removed tag 0.7

On 23 November 2011 at 16:29 Lennart Kats removed tag 0.61

On 23 November 2011 at 16:29 Lennart Kats tagged 1.0

On 23 November 2011 at 16:29 Lennart Kats tagged 1.1

On 23 November 2011 at 16:29 Lennart Kats removed tag 1.0

On 16 December 2012 at 11:25 Guido Wachsmuth commented:

Multi-file analysis is enabled by NBL + the index. However, I am not sure if errors in files which are not open are collected.


On 16 December 2012 at 11:29 Gabriël Konat commented:

Closed files are also analysed as part of the incremental analysis, this updates their error markers.


On 16 December 2012 at 11:29 Gabriël Konat closed this issue.

Log in to post comments