-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pyproject.toml
or SOURCE_DATE_EPOCH for generated file mtime
#651
Use pyproject.toml
or SOURCE_DATE_EPOCH for generated file mtime
#651
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
but this makes the build not (easily) reproducible: because the timestamp on pyproject.toml on your CI system is not the same as the timestamp on that file on my computer. |
wouldn't that be true of every file? |
yes, I guess so. But in that case it seems that #142 didn't really come close to addressing python-poetry/poetry#1102: and it's hard to tell whether the change proposed here is a step in the right or the wrong direction. |
I think its at least no worse with improvements - any change to pyproject.toml (updating mtime) will also make a new repro build anyway, so by default its at least as good as hardcoding a zero while also not making files that break some of my mtime-based cleanup scripts (thats probably a me problem, but still time = 0 is clearly Not Right) I Also added in using |
I don't feel particularly strongly about it. For me personally it's a little chunk of complexity with low value: but then - again for me personally - that's true of a lot of the poetry codebase! We will leave it to someone who has the power to merge to decide whether they want to do so. |
To summarize:
I personally don't care much if the time of generated files is 0 or the time of the pyproject.toml. I assume I'd be more eager to change this if there were other/more references where a time of zero is problematic. Regarding |
Resolves (or rather, revisits): poetry-core#142
Was wondering why there were a bunch of files with time == 0 on my disk, found this previous PR that set mtime to 0 for generated files for deterministic builds: #142 and also this comment at the end that suggested that pulling the time from
pyproject.toml
would be a good way to be deterministic while also having a sensible timestamp: #142 (comment) and went ahead and did that, also adding this suggestion to useSOURCE_DATE_EPOCH
if set #142 (review)