Swiftgen: Configuration file fails: "Missing entry for key xcassets.paths."

Created on 21 May 2018  路  10Comments  路  Source: SwiftGen/SwiftGen

I'm trying to get a configuration file working, and I'm very confused by this error:
Missing entry for key xcassets.paths.
This doesn't make sense to me because the configuration is something I've adapted directly from your examples. Also, paths is listed as deprecated, so it's not clear why it's expecting that instead of "inputs".

Most helpful comment

I ran into this problem as well. Not saying you should change the behavior, just letting you know :)

All 10 comments

Uhm the docs you are seeing are for the upcoming SwiftGen release, where paths will be replaced by inputs (but the old variable will still be supported).

Could you provide your configuration file? (or an extract of it)

Sidenote: it might be best to check the documentation using the tag for your current release, for example:
https://github.com/SwiftGen/SwiftGen/tree/5.3.0

Hi

Can you please tell what version of SwiftGen you're using and provide the content of your configuration file?

Also what is the output of linting your config file using swiftgen config lint?

paths is only deprecated in master, which isn't released yet. In the latest release, inputs hasn't been introduced yet, it has only been introduced (thus deprecating paths) in the master branch, which is unreleased yet. So you probably were reading the docs from master and not the one matching the version you're using?

I'm on SwiftGen 5.3.0. It's not clear to me why your documentation says 5.3.0 but has stuff for future versions. What branch has actual documentation for 5.3.0 if not master? I'll play with the config more looking at older documentation and see what I can get working

Ok, I got it working with the documentation linked above: https://github.com/SwiftGen/SwiftGen/tree/5.3.0

I would recommend tagging master with a new version tag so others don't make the same mistake I did.

Ehm, master is tagged, that's the URL you're using. I've added an issue to discuss possible use of gitflow in #432.

Could you clarify, what was your issue?

https://github.com/SwiftGen/SwiftGen

This page is tagged as 5.3.0, but has documentation for a future version I guess? That seems like a mistake to me, as anyone, like me, trying to use 5.3.0 won't have accurate documentation.

It works that way because we follow the GitHub-flow convention (like most OSS repos). That means master is the branch containing the latest changes, where we merge all PRs while we add features to SwiftGen. Then once we feel all the features added in master are fit to be packaged in a release we do a tag. You can search for GitHub-flow to learn more about that convention.

That means that to find the documentation for the version you are using, you should go to that tag in the repo to see the code and documentation as it was when that version was released.
_(Note that even if that's uncommon, people could choose to install master instead of a tagged version to get the latest changes, even the ones unreleased yet, akin to the concepts of "Nightly Builds" on other projects)_

That being said, I indeed admit that it might be confusing, because most people just go on the repo's home page and read the doc without thinking about versioning. That's a legit concern and we're actually discussing in #432 about changing that and use git-flow instead of GitHub-flow.

Note that this wouldn't change the fact that people not using the latest version would still need to go to the tag corresponding to the version they use to get the corresponding documentation anyway.

(That's also the reason why we have the swiftgen config lint command to help people get the right syntax and know what to fix, and quite thorough error handling of config file syntax to help the end-user know what is invalid if any)

I ran into this problem as well. Not saying you should change the behavior, just letting you know :)

@AliSoftware @djbe you are both misunderstanding the Github Flow social contract. Master is considered deployed--read the many Github blogs on the subject. Since you are creating a library every merge to master should be versioned and released. The fact you are currently 161 commits in master after the last release is not honoring the contract. Recommend you adopt git-flow instead of Github-flow or start versioning each merge to Master.

With that said, appreciate all the great work on SwiftGen, I use it everyday.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valerianb picture valerianb  路  7Comments

BastiaanAndriessen picture BastiaanAndriessen  路  4Comments

AliSoftware picture AliSoftware  路  6Comments

djbe picture djbe  路  6Comments

kacper1703 picture kacper1703  路  3Comments