Try to use Projectile to find files in *compilation* buffer if possible.

If not, fallback to the original function.

* projectile.el (projectile-compilation-find-file): Use projectile to find
files in *compilation* buffer if possible.

(projectile-mode): Add the previous function around `compilation-find-file'.

Add/Remove the advice around `compilation-find-file' when the mode is on/off.
Bozhidar Batsov <notifications@github.com> writes:

> In projectile.el:
>
>> @@ -1732,6 +1732,24 @@ with a prefix ARG."
>>      (puthash project-root compilation-cmd projectile-compilation-cmd-map)
>>      (compilation-start compilation-cmd)))
>>  
>> +(defun projectile-compilation-find-file (oldfun &rest args)
>> +  "Try to find a buffer for FILENAME, if we cannot find it,
>> +fallback to the original function, OLDFUN.
>> +
>> +\(advice-add 'compilation-find-file :around projectile-compilation-find-file)"
>> +  (destructuring-bind (marker filename directory &rest formats) args
>
> That should be cl-destructuring-bind.

Updated.