-
Notifications
You must be signed in to change notification settings - Fork 249
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
Generated files depend on local file modification time #4859
Comments
Sorry for many letters guys 😄 |
Why will it be an issue? If they are removed from the repository, it won't affect the diff; it will just generate a different |
@osmaczko I wasn't sure about this part. If this value doesn't affect the code, then... why is it there for? 😄 |
It doesn't impact the logic of the code, I believe it's just a timestamp to know when the files are generated, I believe we could in theory override |
Related: #4191
TLDR;
I noted that even generating with
nix-shell
, I still might get ~13 files change on latest develop. It depends from which repository directory I change the files.Details
status-go
repo cloned.make generate
(with nix-shell, ofc) in directory1
and push the changes2
make generate
in directory2
.Result:
Each file contain such change:
So although I have the same
nix-shell
configuration, I get different output. Same happens if one directory is on my machine and the second directory is one another dev's machine.Why does this change occur?
The only thing changed is the
modTime
. Which stands for "modified time".This field is calculated here:
It's taken from
stat
OS call.For me it changed
1709295743
(Fri Mar 01 2024 12:22:23)1707305567
(Wed Feb 07 2024 11:32:47)This corresponds to the real value returned by
stat
:➜ status-go git:(develop) ✗ stat -f "%m" ./static/emojis.txt 1707305567
And this value is the same for all generated files. No matter of when the file was actually modified.
E.g.
static/emoji.txt
was modified a long time ago:Questions
Is this a bug of
go-bindata
?I suppose the migration should contain some real timestamps from git?
Should we bother about this?
I don't understand if there're really any consequences.
I expect:
And the fun part:
This will still be an issue, even if we move the generation to CI 🤔
The text was updated successfully, but these errors were encountered: