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

Compile time error with Swift Package manager #4533

Open
alex5733 opened this issue Dec 15, 2020 · 12 comments
Open

Compile time error with Swift Package manager #4533

alex5733 opened this issue Dec 15, 2020 · 12 comments

Comments

@alex5733
Copy link

Hi I am getting multiple compile time error with Charts 4.0 with Xcode Version 12.1 (12A7403)

Charts/Renderers/AxisRendererBase.swift:16:12: Type 'AxisRendererBase' does not conform to protocol 'Renderer'
Charts/Renderers/Renderer.swift:19:9: Protocol requires property 'viewPortHandler' with type 'ViewPortHandler'
Charts/Renderers/AxisRendererBase.swift:15:2: Only classes that inherit from NSObject can be declared @objc
Charts/Renderers/AxisRendererBase.swift:26:9: 'super' members cannot be referenced in a root class
Charts/Renderers/AxisRendererBase.swift:68:56: Cannot find 'viewPortHandler' in scope
Charts/Renderers/AxisRendererBase.swift:70:100: Cannot find 'viewPortHandler' in scope
Charts/Renderers/AxisRendererBase.swift:71:100: Cannot find 'viewPortHandler' in scope
Charts/Renderers/AxisRendererBase.swift:109:36: Value of type 'Double' has no member 'roundedToNextSignficant'
Charts/Utils/ChartUtils.swift:160:66: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/ScatterChartRenderer.swift:174:50: Extra argument 'align' in call
Charts/Renderers/ScatterChartRenderer.swift:174:50: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/XAxisRenderer.swift:252:25: Cannot find 'NSParagraphStyle' in scope
Charts/Renderers/XAxisRenderer.swift:456:20: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/XAxisRendererHorizontalBarChart.swift:257:28: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/YAxisRenderer.swift:126:20: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/YAxisRenderer.swift:47:24: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/YAxisRenderer.swift:303:24: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/YAxisRendererHorizontalBarChart.swift:138:38: Extra argument 'align' in call
Charts/Renderers/YAxisRendererHorizontalBarChart.swift:138:44: Missing argument for parameter 'angleRadians' in call
Charts/Utils/ChartUtils.swift:178:15: 'drawText(:at⚓angleRadians:attributes:)' declared here
Charts/Renderers/YAxisRendererHorizontalBarChart.swift:138:38: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/YAxisRendererHorizontalBarChart.swift:261:28: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/YAxisRendererRadarChart.swift:161:24: Extra argument 'align' in call
Charts/Renderers/YAxisRendererRadarChart.swift:161:33: Missing argument for parameter 'angleRadians' in call
Charts/Utils/ChartUtils.swift:178:15: 'drawText(
:at⚓angleRadians:attributes:)' declared here
Charts/Utils/ChartUtils.swift:230:68: Cannot find type 'NSTextAlignment' in scope
Charts/Renderers/LineChartRenderer.swift:588:50: Extra argument 'align' in call
Charts/Renderers/LineChartRenderer.swift:588:50: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/PieChartRenderer.swift:476:49: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:486:53: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:499:53: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:510:49: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:527:50: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:527:50: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/PieChartRenderer.swift:535:54: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:535:54: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/PieChartRenderer.swift:547:54: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:547:54: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/PieChartRenderer.swift:557:50: Extra argument 'align' in call
Charts/Renderers/PieChartRenderer.swift:557:50: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/RadarChartRenderer.swift:242:46: Extra argument 'align' in call
Charts/Renderers/RadarChartRenderer.swift:242:46: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/BarChartRenderer.swift:674:75: Extra argument 'align' in call
Charts/Renderers/BarChartRenderer.swift:674:80: Missing argument for parameter 'angleRadians' in call
Charts/Utils/ChartUtils.swift:178:15: 'drawText(:at⚓angleRadians:attributes:)' declared here
Charts/Renderers/BarChartRenderer.swift:679:75: Extra argument 'align' in call
Charts/Renderers/BubbleChartRenderer.swift:217:46: Extra argument 'align' in call
Charts/Renderers/BubbleChartRenderer.swift:217:46: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/CandleStickChartRenderer.swift:331:50: Extra argument 'align' in call
Charts/Renderers/CandleStickChartRenderer.swift:331:50: Cannot infer contextual base in reference to member 'center'
Charts/Renderers/LegendRenderer.swift:551:66: Extra argument 'align' in call
Charts/Renderers/LegendRenderer.swift:551:70: Missing argument for parameter 'angleRadians' in call
Charts/Utils/ChartUtils.swift:178:15: 'drawText(
:at⚓angleRadians:attributes:)' declared here
Charts/Renderers/LegendRenderer.swift:551:66: Cannot infer contextual base in reference to member 'left'
Charts/Charts/ChartViewBase.swift:328:45: Extra argument 'align' in call
Charts/Charts/ChartViewBase.swift:328:54: Missing argument for parameter 'angleRadians' in call

@AjazDev
Copy link

AjazDev commented Dec 16, 2020

Yes, facing same issue when trying to add Charts as SPM dependency.

@sumimakito
Copy link

Same issue here.

I'm using Charts as a dependency in another Swift package.

@matt-dewitt
Copy link

Same issue here, doesn't compile when pulled in via SPM using Xcode 12.3

@matt-dewitt
Copy link

Bumped it down to version 3.6.0 and it seem ok now.

@radianttap
Copy link

A bunch of errors are thrown when using Charts 4.0.0 through SPM.

As @matt-dewitt said, going back to 3.6.0 passes compile. Now to see do features I need actually work. :)

@AjazDev
Copy link

AjazDev commented Dec 18, 2020

I needed some of the features from the latest branch so I can't go back to 3.6.0.
For now I forked it and added "Import UIKit" in a bunch of files that were throwing the error... 🤨

@dudenamedjune
Copy link

@AjazDev Did that fix the errors?

@radianttap
Copy link

With changes from my #4539 PR, everything compiles fine.

@merichle
Copy link

merichle commented Feb 2, 2021

I have same issue too in version 4.0.0 and unfortunately I had to go back to version 3.6.0

@rollinsio
Copy link

rollinsio commented Oct 5, 2021

This appears to be back with the advent of XCode 13 when using the SPM. However, when inspecting some of the changes that @radianttap made I suspect that this might actually be due to a regression.

Going back to 3.6.0 allows you to compile.

@GrandFelix
Copy link

as @rollinsio mentioned. With xcode 13 this again becomes an issue.

@RobertBernardini
Copy link

RobertBernardini commented Mar 14, 2022

The same thing is happening in our project when downloading the source files using Carthage. We use our own project settings to build the framework based on the source files rather than building and importing the framework via Carthage.

Seems that this has been reopened since October last year, has anyone been able to have a look into this so that we can get started using 4.0.2? We would really love to use the latest version with the new accessibility features which have been added since 3.6.0.

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