loganwright / Genome

A simple, type safe, failure driven mapping library for serializing JSON to models in Swift 3.0 (Supports Linux)
MIT License
762 stars 58 forks source link

version 3.1.0 not work in Carthage #75

Closed wanewang closed 7 years ago

wanewang commented 8 years ago

I'm trying Genome with Carthage, but when running carthage update it won't download Packages folder content. Node, PathIndexable and Polymorphic is missing in project, which caused built failed.

I'm now running with specific version github "LoganWright/Genome" == 3.0.3 It worked.

might be submodule issue?

loganwright commented 8 years ago

@jhihguan I honestly have no idea 🙊 I'm not up and up on Carthage.

Would deleting the .git folders in Packages help perhaps?

wanewang commented 8 years ago

I don't see .git in Packages folder.

When I clone the project in SourceTree it will error with fatal: No url found for submodule path 'Packages/Node-1.0.1' in .gitmodules and if I type git submodule in terminal, it will show fatal: no submodule mapping found in .gitmodules for path 'Packages/Node-1.0.1'

But when I try pod install in another project, those package will download correctly.

yeah...I'm not up on Carthage😆

max-potapov commented 7 years ago

Got same git error with SPM:

$ swift build
Cloning https://github.com/LoganWright/Genome.git
/Users/max/.homebrew/bin/git clone --recursive --depth 10 https://github.com/LoganWright/Genome.git /Users/max/devel/***-swift/Packages/Genome.git
Cloning into '/Users/max/devel/***-swift/Packages/Genome.git'...
fatal: No url found for submodule path 'Packages/Node-1.0.1' in .gitmodules

error: Failed to clone https://github.com/LoganWright/Genome.git to /Users/max/devel/***-swift/Packages/Genome.git
loganwright commented 7 years ago

@jhihguan @max-potapov can you attempt 3.1.1 and let me know if the issue is resolved.

wanewang commented 7 years ago

I'm testing it in https://github.com/bwhiteley/JSONShootout if I change version to 3.1.1 and do carthage update --no-build theGenome.xcodeproj still link to order version of Node Polymorphic PathIndexable see the screenshot below screen shot 2016-11-08 at 14 36 44

strange carthage...

max-potapov commented 7 years ago

@LoganWright tried 3.1.1 with spm and git recursive clone – everything is fine. thanks!

wanewang commented 7 years ago

ahh, I think I found the issue, because carthage will use source code's Genome.xcodeproj to build project. But right now Node Polymorphic PathIndexable is point to old code which is not existed anymore. (you can see my screenshot above)

I know how to add file into project, but I don't know how to link file like the way you did ex. Core/Node+Init.swift. Can you also tell me how you do that?

loganwright commented 7 years ago

@jhihguan I was regenerating project from SPM, normally I wouldn't include the xcodeproj in the repository, but its necessary for Carthage. Let me try a regen and see what happens.

loganwright commented 7 years ago

@jhihguan how does #79 look?

loganwright commented 7 years ago

@jhihguan @max-potapov can you guys try 3.1.2 🙏

wanewang commented 7 years ago

@LoganWright it works! maybe after @max-potapov confirmed than this issue can be closed

wanewang commented 7 years ago

@LoganWright sorry... I found a small issue that 3.1.2 only build Mac device while 3.0.3 has Mac, iOS, watchOS, tvOS

wanewang commented 7 years ago

I add platform support in #80 and also set the minimum version for each platform

max-potapov commented 7 years ago

@jhihguan @LoganWright both spm & carthage works fine with 3.1.2!

loganwright commented 7 years ago

@jhihguan thanks, merged as 3.1.3

https://github.com/LoganWright/Genome/releases/tag/3.1.3

wanewang commented 7 years ago

great! it works