Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Redeclaration Error with Swift 4.x & Xcode 10 Beta #975

Closed
anilabsinc-ajay opened this issue Jun 5, 2018 · 20 comments
Closed

Invalid Redeclaration Error with Swift 4.x & Xcode 10 Beta #975

anilabsinc-ajay opened this issue Jun 5, 2018 · 20 comments

Comments

@anilabsinc-ajay
Copy link

Hi Team,
That's called a great start with Xcode 10 beta. Now there is no warning for Invalid Redeclaration, instead, it shows Error...
screen shot 2018-06-05 at 11 19 12 am

@dispatchMain
Copy link

Changing Swift version to 3 does not make it compile either; neither does changing back to legacy build system. It fails in all conditions.

@anilabsinc-ajay
Copy link
Author

Any Plan to resolve this issue or I have to move back to Xcode 9.4

@alecdoconnor
Copy link

I have created a PR at #978 to hopefully fix this issue. I noticed, after creating it, that another PR exists which has failed tests. Hopefully this produces the right results!

@harisworld21
Copy link

Try commenting out duplicate declarations and compile. It worked for me. And in implementation, use only one type of method call. It is a temporary solution. We need to wait anyways, till we get a fix.

@alecdoconnor
Copy link

alecdoconnor commented Jun 6, 2018

Hi @harisworld21
that is a working solution, the PR has removed these lines of code to conform to Swift Evolution's SE-0054 Abolish ImplicitlyUnwrappedOptionals

@anilabsinc-ajay
Copy link
Author

@alecdoconnor Need a solution that should work on both xcode 9 and 10

@gcharita
Copy link
Contributor

gcharita commented Jun 7, 2018

I tried my best to support both Xcode 9 and 10 beta in pull request #980 .

Invalid redeclarations removed from swift 4.2 and above. This means that the warnings in Xcode 9.3 and 9.4 will remain. (invalid redeclarations when removed in swift 4.1 causes some tests to fail)

I even added support for Xcode 9.2 (compactMap)

Hope this helps.

@joshwoods
Copy link

Is there any timeline to be getting a fix in for this? I would like to be moving forward using Xcode 10 to prep for iOS 12, however, this is making it so I cannot even compile our main app. Thanks in advance!

@alecdoconnor
Copy link

Hi Josh! Feel free to contribute to the PRs to help us get closer to a working build. I believe there were two (the last time that I checked) that technically work, so you would be able to check the branch out directly into your project.

@anilabsinc-ajay
Copy link
Author

@alecdoconnor Are you planning any timeline for this.

@alecdoconnor
Copy link

alecdoconnor commented Jun 11, 2018 via email

@LeoSnek
Copy link

LeoSnek commented Jun 18, 2018

Aren't these warnings simply because one implementation of the function is marked for specific versions of Swift and the other is not?

i.e. just add the following to the other implementation and the warning goes away:

#if (swift(>=4.1.50))

@anilabsinc-ajay
Copy link
Author

@tristanhimmelman Any Plans to update This awesome mapping library for iOS

@gcharita
Copy link
Contributor

@anilabsinc-ajay this issue has already been fixed in version 3.3.0. Just download the latest version.

@LeoSnek
Copy link

LeoSnek commented Jun 21, 2018

I'm using 3.3.0 and I'm getting these warnings.

@gcharita
Copy link
Contributor

@staz1000 I am not getting any error in an Xcode 10 project with version 3.3.0.
Maybe you should run a clean or delete DerivedData.

@wudijimao
Copy link

Update to 3.3.0 is OK!!!!!
pod update ObjectMapper

@wudijimao
Copy link

Any way, The document maybe need to update~ It still suggest us to use ver 3.2.0~

@tristanhimmelman
Copy link
Owner

tristanhimmelman commented Jun 22, 2018 via email

@XutongGithub
Copy link

XutongGithub commented Sep 25, 2018

you can update your Profile.
pod 'ObjectMapper', '~> 3.3'
and run pod install,this probrom is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants