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

Support for Xcode 14 #4860

Closed
lukelabonte opened this issue Jul 6, 2022 · 34 comments
Closed

Support for Xcode 14 #4860

lukelabonte opened this issue Jul 6, 2022 · 34 comments
Assignees

Comments

@lukelabonte
Copy link

lukelabonte commented Jul 6, 2022

What did you do?

Build the project with Xcode 14 Beta 3

What did you expect to happen?

For the project to successfully build.

What happened instead?

There are 2 types of build errors

  1. Build error around CandleStickChartRenderer's and RadarChartRenderer's drawData(context: CGContext) where the IndexingIterator are not equivalent. Raw message:

error build: Referencing instance method 'makeIterator()' on 'Collection' requires the types 'IndexingIterator' and 'IndexingIterator' be equivalent

  1. Build error around ChartDataSet not conforming to RangeReplaceableCollection as replaceSubrange(_:with:) is missing. Raw messages:

error build: Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'

error build: Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'

Charts Environment

Charts version/Branch/Commit Number: 4.0.3
Xcode version: Xcode 14 Beta 3 (14A5270f)
Swift version: 5.7
Platform(s) running Charts: iOS
macOS version running Xcode: 12.4 (21F79)

@dingtianran
Copy link

Saw the same error this morning after upgraded to beta3.
Beta 2 is fine, I guess for now I'll stick to beta 2 until this got resolved

@gsbernstein
Copy link

I resorted to just unlocking the files and resolving locally. Lasts until the pod gets reinstalled. For each:

  1. Commenting out the whole for case let... block
  2. Added this function to the bottom of the extension.
    public func replaceSubrange<C>(_ subrange: Swift.Range<Index>, with newElements: C) where C : Collection, Element == C.Element {
        fatalError()
    }

I know these aren't solutions, just unblocks me for now.

@Brett-Best
Copy link

Brett-Best commented Jul 7, 2022

@gsbernstein https://github.com/danielgindi/Charts/blob/c3701a4e5ce111c29dd7af9e19e6a346ccf0ad52/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift#L427-L431
from #4823

@liuxuan30
Copy link
Member

will look into this. Is there any PR available already? Normally I would prefer beta 6 to start the fix

@Brett-Best
Copy link

Xcode 14 beta 3 fixed the issue with EaseOutBack closure not resolving types in time.

So the only issues are the replaceSubrange which I linked to a potential fix above and I haven’t found a workaround for:

Build error around CandleStickChartRenderer's and RadarChartRenderer's drawData(context: CGContext) where the IndexingIterator are not equivalent.

@liuxuan30
Copy link
Member

Xcode 14 beta 3 fixed the issue with EaseOutBack closure not resolving types in time.

So the only issues are the replaceSubrange which I linked to a potential fix above and I haven’t found a workaround for:

Build error around CandleStickChartRenderer's and RadarChartRenderer's drawData(context: CGContext) where the IndexingIterator are not equivalent.

#4823 is definitely something I would merge fast, but have to think about older swift versions, if nothing special, will get it merged. I have to squeeze my drive to make some pace for beta first...

@lchamp
Copy link

lchamp commented Jul 8, 2022

Xcode 14 beta 3 fixed the issue with EaseOutBack closure not resolving types in time.

Not on my side (and I do have those two new errors too).

@juhanh
Copy link

juhanh commented Jul 8, 2022

for case let set as CandleChartDataSetProtocol in (candleData as ChartData) where set.isVisible
{
      drawDataSet(context: context, dataSet: set)
}

Makes CandleStickChartRenderer build.

@gesabo
Copy link

gesabo commented Jul 22, 2022

Just ran into this in Xcode 14 Beta 3 as well...and can't go back as I can't submit updates in Beta 2, beta season always fun 🤦‍♂️

@dobiho5
Copy link

dobiho5 commented Jul 28, 2022

Xcode 14 beta 4 as well.

@nucauthu
Copy link

nucauthu commented Aug 8, 2022

Xcode beta 5 doesn't fix it

@kevinho96
Copy link

Will there any chance that the fix will be applied and solved before the Xcode 14 public release?

@michalnowak061
Copy link

Will there any chance that the fix will be applied and solved before the Xcode 14 public release?

If not it's good time to say "good bye" for this library.

@robnadin
Copy link

Xcode beta 5 doesn't fix it

It won't ever be fixed by a new release of Xcode because it was a known bug in Swift for quite some time, and has only recently been fixed in Swift 5.7

You can check out the original bug here:
swiftlang/swift#38950

@logancautrell
Copy link

Any updates on if this is going to be addressed soon? Xcode 14 is a month out.

@bardonadam
Copy link

If I'm not mistaken, there are some PRs waiting for approval, which are fixing the issue. Can we merge them?

@pmairoldi pmairoldi self-assigned this Aug 27, 2022
@waterskier2007
Copy link

It looks like said PRs have been merged. Any timeline on a new release?

@phoenisis
Copy link

@waterskier2007 Indeed and code just works fine.

If you do not want to wait until public release you can simply specify branch "master" and not the version.

@pmairoldi
Copy link
Collaborator

I will release a new version when Xcode gm become available

@waterskier2007
Copy link

With the RC now available, what are the chances on a new release?

@waterskier2007
Copy link

@pmairoldi any updates?

@pmairoldi
Copy link
Collaborator

I was off for the last couple days. I will look at it tonight.

@pmairoldi
Copy link
Collaborator

@DanieleCiti
Copy link

closed by https://github.com/danielgindi/Charts/releases/tag/v4.1.0

It is installing the 3.6.0 with pod 'Charts'.

@jonnokim17
Copy link

@DanieleCiti - try increasing the minimum deployment target to 14.0 in your podfile. that should resolve the issue.

@DanieleCiti
Copy link

@DanieleCiti - try increasing the minimum deployment target to 14.0 in your podfile. that should resolve the issue.

Done it and I only have one error now: No such module 'Algorithms'

@jonnokim17
Copy link

@DanieleCiti - i ran into that as well. i just deleted the charts pod and went with swift package instead, which worked.

@DanieleCiti
Copy link

@DanieleCiti - i ran into that as well. i just deleted the charts pod and went with swift package instead, which worked.

I'm gonna do the same -> Adding a package with "Up to next major 4.1.0 < 4.0.0" from https://github.com/danielgindi/Charts.git. That's what you did too?

@jonnokim17
Copy link

@DanieleCiti - yep!

@DanieleCiti
Copy link

@DanieleCiti - yep!

Thanks a lot for your time! It taking a bit of time on the "fetching https://github.com/danielgindi/Charts.git" screen. How long did it takes for you to finish?

@tfonfara
Copy link

@DanieleCiti Up to next major 4.1.0 < 4.0.0 is definitely wrong, it needs to be Up to next major 4.1.0 < 5.0.0 (which works fine for me btw.)

@DanieleCiti
Copy link

@DanieleCiti Up to next major 4.1.0 < 4.0.0 is definitely wrong, it needs to be Up to next major 4.1.0 < 5.0.0 (which works fine for me btw.)

Actually the package manager won't let me choose the version after the < which is set to 4.0.0... I can only set the previous one like my_version < 4.0.0

@tfonfara
Copy link

4.1.0 < 4.0.0 can never be true, so maybe you can try to re-adding it. It should look like this:

@MHamayun
Copy link

MHamayun commented May 3, 2023

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