Closed juftin closed 9 months ago
Aha! The problem is actually with lockfiles with constraints. The SHA256 of the constraint file in Windows doesn't match mac. My best guess is line endings being different here - I'll keep digging.
Yup, the issue is CLRF line endings.
This
return hashlib.sha256(self.lock_file.read_bytes()).hexdigest()
becomes this
lockfile_contents = self.lock_file.read_bytes()
cross_platform_contents = lockfile_contents.replace(b"\r\n", b"\n")
return hashlib.sha256(cross_platform_contents).hexdigest()
:tada: This issue has been resolved in version 1.9.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Changing between Linux and Windows makes hatch-pip-compile try to recreate the lockfile.
For some reason when running in Windows
lockfile_up_to_date
is False butlockfile_up_to_date
is True when run on Linux.See https://github.com/juftin/hatch-pip-compile/actions/runs/7450650936/job/20270034562 / https://github.com/juftin/hatch-pip-compile/pull/57#discussion_r1445050636