uber / mockolo

Efficient Mock Generator for Swift
Apache License 2.0
804 stars 85 forks source link

Fix Import for SwiftSyntax and SwiftSyntaxParser #218

Closed kabirkhaan closed 1 year ago

kabirkhaan commented 1 year ago

Issue In StringExtension SwiftSyntax was directly imported without a canImport check https://github.com/uber/mockolo/blob/2b425df144b0a1e61bf2202d481637741b2b3270/Sources/MockoloFramework/Utils/StringExtensions.swift#L18

Changelog

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

sidepelican commented 1 year ago

Why canImport is needed? https://github.com/uber/mockolo/blob/2b425df144b0a1e61bf2202d481637741b2b3270/Package.swift#L8

We can import SwiftSyntax anytime. and StringExtensions.swift does not have dependency to SwiftSyntaxParser .

kabirkhaan commented 1 year ago

Why canImport is needed?

https://github.com/uber/mockolo/blob/2b425df144b0a1e61bf2202d481637741b2b3270/Package.swift#L8

We can import SwiftSyntax anytime. and StringExtensions.swift does not have dependency to SwiftSyntaxParser .

Thanks for the clarification, I missed that line. Closing this PR