tristanhimmelman / ObjectMapper

Simple JSON Object mapping written in Swift
MIT License
9.14k stars 1.03k forks source link

Xcode 11.4 Swift Package Manager can't import ObjectMapper #1082

Open mymbrooks opened 4 years ago

mymbrooks commented 4 years ago

Before Xcode 11.4 Swift Package Manager can import ObjectMapper successful. After update to Xcode 11.4 the error output: target 'ObjectMapper' referenced in product 'ObjectMapper' is empty

I found in Xcode 11.4 release note

Swift Packages New Features Remote Swift packages with tools version 5.2 and above no longer resolve package dependencies that are only used in their test targets, improving performance and reducing the chance of dependency version conflicts. (56925017) Swift Package Manager uses a new strategy for resolving package dependencies that significantly improves the quality of error messages and performance in complex package graphs. (45371461)

ksloginov commented 4 years ago

In beta 2, for me it's getting imported, however I can't build the project now: Screenshot 2020-02-26 at 15 28 29

I.e. compiler thinks that the files are duplicated. Then, looking at the file structure, I've noticed, that they are actually linked twice: Screenshot 2020-02-26 at 15 35 42

Screenshot 2020-02-26 at 15 32 41

It can't be just me.. Or?

mymbrooks commented 4 years ago

@ksloginov I update to Xcode 11.4 beta 2 the same error

xernaj commented 4 years ago

It might be ok in Xcode 11.4 beta 3.

ksloginov commented 4 years ago

@xernaj of course not, it's Apple after all.

Current status: fails in Xcode 11.4 beta 3.

ksloginov commented 4 years ago

@mymbrooks I've submitted a PR for this issue. With the forked version - it works for me now. Let me know if you're still experiencing the issues w/ PR'ed version

zdnk commented 4 years ago

Any update on this one? Xcode 11.4 is out.

mymbrooks commented 4 years ago

@ksloginov Sorry for late reply I update to 11.4 final, clean all cache, use your repos https://github.com/ksloginov/ObjectMapper.git and still the same error.

ksloginov commented 4 years ago

@mymbrooks Huh.. Just tried with 11.4-release - still works fine for me (with mine repo). Screenshot 2020-03-26 at 12 37 19 Thinking out loud - you're forking my master branch, right? (I was too lazy to create a separate release etc. for that)

Do you have any double-refs with my repo? This is what I see in my real-project, which is depending on OM:

Screenshot 2020-03-26 at 12 38 55

(Before, it used to be a cycle-reference here)

mymbrooks commented 4 years ago

@ksloginov yeah master branch and double refs, I will check source code carefully to find why

mymbrooks commented 4 years ago

@ksloginov It's my mistake, I clone 3.5.1 not master now it works fine.

joshuapoq commented 4 years ago

Definitely an issue with the symlink causing infinite recursion here. That PR should fix it! 👍

ruizmarc commented 4 years ago

Any chance to get the pull request merged?