refactoring issues
Ivan Kazmenko via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 22 04:47:09 PDT 2015
On Friday, 20 March 2015 at 18:37:57 UTC, Vladimir Panteleev
wrote:
> On Friday, 20 March 2015 at 18:36:19 UTC, Vladimir Panteleev
> wrote:
>> On Friday, 20 March 2015 at 18:05:07 UTC, Ivan Kazmenko wrote:
>>> Thanks. I was able to reproduce the workflow you showed in
>>> the gif to the part where an error pop-up (e.g. "no property
>>> iota for type int") is followed by suggesting the appropriate
>>> fix. Do I need another tool for that? Colorout does not
>>> seem to suggest fixes.
>>
>> OK, here it is:
>>
>> https://github.com/CyberShadow/AutoFix
>>
>> It has some hardcoded paths though.
>
> It's used like this:
>
> C:\Path\To\colorout\colorout ^
> --json C:\Temp\colorout.json ^
> --trigger id=C:\Path\To\AutoFix\autofix.exe ^
> C:\Path\To\colorout\d.col ^
> dmd, rdmd etc...
Yay, I finally got it working! Thank you, it feels nice.
Theoretically, AutoFix can be extended to handle cases similar to
mine, though the details may be cumbersome. The template
constraint is reported by the compiler, so the identifier to be
imported is right there in the error message. One may just
tokenize the string and loop over the identifiers... But that
will perhaps generate too much noise in suggestions.
The biggest thing to learn for me however was that I can use JSON
files of Phobos and druntime, which in turn can be generated by
building them.
Ivan Kazmenko.
More information about the Digitalmars-d-learn
mailing list