LocoKit icon indicating copy to clipboard operation
LocoKit copied to clipboard

LocoKit SPM resolve warning

Open BrianBatchelder opened this issue 4 years ago • 2 comments
trafficstars

FYI: while building the latest ArcMini, Xcode spit out the following warning:

found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    .../DerivedData/Arc_Mini-dlenhigbcoeldyfxldburkutnfjk/SourcePackages/checkouts/LocoKit/LocoKit/Timelines/ActivityTypes/CoordinateBins.fbs

Not sure if this is a LocoKit or ArcMini issue.

BrianBatchelder avatar Jun 09 '21 18:06 BrianBatchelder

That's a LocoKit issue, and one I'll get cleaned up shortly. Thankfully it's harmless - I've just moved a non-code file into the repo and not told the Package.swift about it.

Some context on the file, for interest's sake: LocoKit loads its ActivityType ML models from database, and the slowest part of that is the serialised coordinate matrices. I'd previously been using a custom serialisation (to save db space, and make it easier for me to eyeball the strings in the db).

Deserialising that string was a performance bottleneck, that caused brief recording glitches when transitioning between D2 model regions (due to switching in a new D2 classifier, thus loading models from db for the new D2 region). It also caused UI freezing in some cases, when navigating to old timeline views of different geographic regions in Arc v3. (It's less obvious in Arc Mini because there's no calendar view, so you can really only swipe back day by day).

Anyway I've got around that by using FlatBuffers to do the serialising/deserialising. Much faster, no freezes, no glitches. And that .fbs file is the (unnecessary) FlatBuffers data structure description. It's only used when recreating the generated code (CoordinateBins.swift). But I figured it's important to have it there with the code, for if/when that recreating is needed.

Anyway tldr: I'll change the Package.swift to ignore it 😂

sobri909 avatar Jun 10 '21 10:06 sobri909

Thanks for the thorough answer! I fully support keeping the things that generate the code with the code. I can't tell you how many times I've tried to go back in time to reproduce a problem but be unable to reproduce it, or unable to debug it, because the VCS didn't include something that was generated or was used to generate something else.

BrianBatchelder avatar Jun 11 '21 17:06 BrianBatchelder