Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Adrian,
Earlier today I was experiencing the inconsistencies with the PW FileCompiler but it's working consistently for me now. I've tested on a couple of installations, updating the module from a previous installed version. So it's difficult for me to debug the earlier issue now.
See if it's working reliably for you now after applying these changes. If it's still inconsistent then you could investigate this section of the compile method: https://github.com/processwire/processwire/blob/0a926b58fae019c8ed045e4aeabbe25d41bd83d8/wire/core/FileCompiler.php#L370-L387
If there is an issue I think this is where it lies. If you confirm that it's the cache causing the normal compilation to be skipped it might be possible to clear the relevant cache in the module upgrade method.
The other changes in this commit relate to backslashes in Windows paths.
$config->paths
converts the backslashes but__DIR__
doesn't so best to use$config->paths
throughout seeing as you are doing string comparisons on the paths in places. This was the cause of the undefined index issue I mentioned previously.