Skip to content

Console stacktrace double click not working due to absolute paths in messages #7

Closed
@SugoiDev

Description

@SugoiDev

Unity version: 5.3.5f1
Incremental Compiler version: 1.2.5
Issue occurs with compiler Incremental6, but not with Mono3. It also does not occur if the IncrementalCompiler is not installed (not a Unity bug).

How to reproduce
Simply create a new project and add the IncrementalCompiler 1.2.5 set to use the Incremental6 compiler. Have a script generate a warning and try double clicking the warning in the console. It will do nothing.

Investigation
I Created a simple script with a field x, which I assigned but never used. This generates a warning. Without using the Unity3D.IncrementalCompiler at all, the default behavior for Unity when we single click the error on the console is to highlight the corresponding script.
Double clicking should open the configured editor (usually Visual Studio) at the offending line.

Without using the IncrementalCompiler at all, this works nicely. The same when using Mono3 in the compiler settings.
The warning generated in those cases is like this:

Assets/AAA.cs(7,9): warning CS0414: The field 'AAA.x' is assigned but its value is never used

But, when using Incremetal6, the warning is like this:

V:\tmp\TESTING\Assets/AAAZ.cs(7,9): warning CS0414: The field 'AAA.x' is assigned but its value is never used

This breaks Unity's internal AssetDatabase so it no longer can highlight the offending script, neither can it open the script in the editor. In the default console, no error or warning will be shown. It will simply do nothing.

To try to investigate it a bit further, I imported an enhanced console I regularly use (Editor Console Pro). This enhanced console, then, gave me the proper warning that Unity was not showing. When double clicking the warning, I got this:

Invalid AssetDatabase path: V:\tmp\TESTING\Assets/AAA.cs. Use path relative to the project folder.

The gist is that Unity can only deal with assets on paths relative to the Assets folder, but the IncrementalCompiler is somehow outputting messages with absolute paths when compiling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions