I have noticed that the change of an executable bit for a file included in a filegroup is not detected by bazel-diff. This has made it a bit challenging to accurately track certain changes.
The simple change in the SourceFileHasher.kt file can fix this behavior:
val isExecutable =
try {
java.nio.file.Files.getPosixFilePermissions(absoluteFilePath).let { perms ->
perms.contains(java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE) ||
perms.contains(java.nio.file.attribute.PosixFilePermission.GROUP_EXECUTE) ||
perms.contains(java.nio.file.attribute.PosixFilePermission.OTHERS_EXECUTE)
}
} catch (_: Exception) {
// Fallback for non-POSIX filesystems.
file.canExecute()
}
putBytes(byteArrayOf(if (isExecutable) 0x01 else 0x00))
I'm curious to know if there are any planned improvements or updates that might address this behavior in the near future.
Thanks in advance for your help!
I have noticed that the change of an executable bit for a file included in a filegroup is not detected by bazel-diff. This has made it a bit challenging to accurately track certain changes.
The simple change in the SourceFileHasher.kt file can fix this behavior:
I'm curious to know if there are any planned improvements or updates that might address this behavior in the near future.
Thanks in advance for your help!