Provide option to sync timestamps from source

Open
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, swift

Research direction

Start by tracing index-import's handling of imported unit files and the source-file timestamps described in the issue. Determine how timestamp adjustment could preserve matching timestamps while making imported units older than the destination source, then verify that Xcode re-indexes files whose timestamps differ.

Written by the indexing model from the issue text.

Description

@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.

Dominant language
C++
Stars
335
Forks
25
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MobileNativeFoundation/index-import

All issues in MobileNativeFoundation/index-import

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.