Skip to content
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

Provide option to sync timestamps from source #7

Open
kastiglione opened this issue Jun 21, 2019 · 1 comment
Open

Provide option to sync timestamps from source #7

kastiglione opened this issue Jun 21, 2019 · 1 comment

Comments

@kastiglione
Copy link
Contributor

@nvanfleet asked on twitter whether index-import would work when syncing indexes between local checkouts, if they're not on the same git version.

This may work by adjusting the timestamp of output unit files. For example, consider importing MyFile.o-AAAAAAAAAAAA from checkout A into checkout B. If A/MyFile.swift and B/MyFile.swift have different modification times, then this index may be invalid, because A/MyFile.swift is in the future compared to B/MyFile.swift, or vice versa. To resolve this, after importing index-import could update the timestamp of the new unit (MyFile.o-BBBBBBBBBBBB) file to be be earlier than B/MyFile.swift. Xcode would hopefully see the index as being out of date, and re-index B/MyFile.swift. Source files that have matching timestamps would have their timestamp preserved.

@kastiglione
Copy link
Contributor Author

Or to put it much more succinctly: import only the index files where the source files have the same timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant