Swiftgen: Help, Missing entry for key Error

Created on 6 Jun 2018  Â·  3Comments  Â·  Source: SwiftGen/SwiftGen

always show me Missing entry for key xcassets.paths., but i did add correct path i think.
My test project structure:
screen shot 2018-06-06 at 11 36 02 am
and my swiftgen.yml is this:
screen shot 2018-06-06 at 11 37 21 am

difficult to understand why always failure.
the error is:
screen shot 2018-06-06 at 11 39 14 am

duplicate

Most helpful comment

Hi @SummerHF !

The error message is trying to tell you that your swiftgen.yml miss an paths: sub-entry in the xcassets: entry.

The problem is that, in the currently last released version of SwiftGen, the swiftgen.yml config file expect the inputs files to be under a paths: key, and indeed we have renamed that key in our code recently to inputs: instead… but that change is in the master branch but still not released in an official version yet (it will be part of the next upcoming release).

So what lead you to the confusion is that if you look at master and the README.md or docs that are in master, you'll indeed see the new docs… that correspond to that new param name not yet released. While if you go back to the tag corresponding to your installed version, the docs will use paths: in the doc and examples.

We realize that it's confusing — the docs in the README and home page of the GitHub pointing to master so to stuff not yet released — and we're planning to improve that in a near future — see #432, or more likely https://github.com/SwiftGen/swiftgen.github.io/issues/1 : we plan on having a dedicated documentation website/docset in the future and make it more clear which version each doc are documenting.

In the meantime, all you have to do is remplace - inputs: with - paths: (to continue using the old config key name) until the new version is released (and the new key name indeed takes it place)

All 3 comments

Hi @SummerHF !

The error message is trying to tell you that your swiftgen.yml miss an paths: sub-entry in the xcassets: entry.

The problem is that, in the currently last released version of SwiftGen, the swiftgen.yml config file expect the inputs files to be under a paths: key, and indeed we have renamed that key in our code recently to inputs: instead… but that change is in the master branch but still not released in an official version yet (it will be part of the next upcoming release).

So what lead you to the confusion is that if you look at master and the README.md or docs that are in master, you'll indeed see the new docs… that correspond to that new param name not yet released. While if you go back to the tag corresponding to your installed version, the docs will use paths: in the doc and examples.

We realize that it's confusing — the docs in the README and home page of the GitHub pointing to master so to stuff not yet released — and we're planning to improve that in a near future — see #432, or more likely https://github.com/SwiftGen/swiftgen.github.io/issues/1 : we plan on having a dedicated documentation website/docset in the future and make it more clear which version each doc are documenting.

In the meantime, all you have to do is remplace - inputs: with - paths: (to continue using the old config key name) until the new version is released (and the new key name indeed takes it place)

Note: this is a dupe of #431.

Thank you very much. I have solved this problem. The process is very painful, you know it's not very difficult technical problems but all about your configuration need correct. May add a short tutorial video or provide a detailed document which i think may very helpful....

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BastiaanAndriessen picture BastiaanAndriessen  Â·  4Comments

gereons picture gereons  Â·  5Comments

romk1n picture romk1n  Â·  7Comments

marcelofabri picture marcelofabri  Â·  6Comments

KonstantinBerkow picture KonstantinBerkow  Â·  5Comments