giginet / danger-xcprofiler

🚫 danger plugin for asserting Swift compilation time
MIT License
50 stars 4 forks source link

Error: Any matching derived data are not found #6

Closed yhkaplan closed 6 years ago

yhkaplan commented 6 years ago

Issue

CIでdanger-xcprofilerを実行すると下記のエラーが出ます。恐らく、derived dataのパスを指定するオプションがあれば、解決できると思いますが、PRを出す前に他に解決法がないかを確認しておきたいです。ご参考までにDangerfileの対象の部分を下に記載しています。 The error below appears when I run danger-xcprofiler on our CI system. I suspect that if I was able to designate the derived data path I could fix the problem, but I would like to make sure I'm on the right track before submitting a PR. The relevant part of the Dangerfile is below for your reference.

Error

Any matching derived data are not found

Dangerfile

xcprofiler.inline_mode = false
# 下記しきい値はms単位
xcprofiler.thresholds = {
  warn: 250,
  fail: 500
}
xcprofiler.report '{アプリ名}'
giginet commented 6 years ago

I'll check this and reply soon. Please moment 🙏

yhkaplan commented 6 years ago

@giginet Hello, do you think you can reply this week?

giginet commented 6 years ago

Do it work well just executing xcprofiler from CLI?

$ xcprofiler

If it also not work well, I suggest implementing new API like following:

xcprofiler.report(delived_data_path: "/path/to/*.xcactivitylog")
giginet commented 6 years ago

Sorry for my late reply 🙇

yhkaplan commented 6 years ago

Thanks for the reply! Running XCProfiler in the command line worked without having to specify the derived data, but I finally figured out what the issue is! It's an oversight on my part!

We had been running our Fastlane build script after Danger, so no DerivedData existed at that point. Our CI system is cloud-based, so DerivedData is moved or deleted after each run. I expect that most developers would notice that they need to build their app before using xcprofiler-danger, but, just in case, I would like to make a pull request to the README, updating the 'Usage' section.

Thanks for your help!

I have one final thing I want to ask about. Originally we ran Danger before Fastlane so we could find serious errors before wasting time on trying to compile, but is there some way you avoid this time lag?

Either way, we'll definitely use your tool as it's very useful!