You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a couple of issues I wanted to make you aware of. [I considered opening a separate issue for the compilation issues, vs. the SPM package search issue - you will probably want to track them separately. But I don't want to clutter your issues list.]
Ambiguous Package Name
When I try loading your package Xcode points to a different package than the url you provided, my guess is that both these packages are being searched for in a non-case-specific way, so they look the same. (CodeMirror-Swift vs codemirror-swift)
I specify https://github.com/khoi/codemirror-swift, but this link appears in Xcode https://github.com/ProxymanApp/CodeMirror-Swift - which does not use CodeMirror 6.0
Compilation Errors
I tried using your url inside a Package.swift file in a local package instead [this worked], and the package doesn’t compile due to these errors:
CodeMirrorWebView.swift:39:43: error: cannot find type 'NSRect' in scope
and CodeMirrorWebView.swift:39:21: error: initializer does not override a designated initializer from its superclass
It looks like these two lines need to conditionally compile based on when using AppKit, vs using UIKit/SwiftUI.
There's a third issue with the main module, which I haven't researched/resolved, so I'm using a workaround:
CodeMirrorWebView.swift:98:17: error: value of type 'WKWebView' has no member 'allowsMagnification'
Since WKWebView does not have an allowsMagnification property, I commented it out.
With these errors corrected, the test module fails:
codemirror-swift-main/Tests/CodeMirrorTests/CodeMirrorTests.swift:10:24: error: cannot call value of non-function type 'module<CodeMirror>'
XCTAssertEqual(CodeMirror().text, "Hello, World!")
By commenting out the assertion I did get a successful compile. This is not a final solution but it allows me to try to actually use your package.
I'll let you know how I make out when I swap in your package to my existing app (which uses CodeMirror 5.x).
After making those 3 changes the package successfully compiles
The text was updated successfully, but these errors were encountered:
Thanks for putting this package together!
I've run into a couple of issues I wanted to make you aware of. [I considered opening a separate issue for the compilation issues, vs. the SPM package search issue - you will probably want to track them separately. But I don't want to clutter your issues list.]
Ambiguous Package Name
When I try loading your package Xcode points to a different package than the url you provided, my guess is that both these packages are being searched for in a non-case-specific way, so they look the same. (
CodeMirror-Swift
vscodemirror-swift
)I specify
https://github.com/khoi/codemirror-swift
, but this link appears in Xcodehttps://github.com/ProxymanApp/CodeMirror-Swift
- which does not use CodeMirror 6.0Compilation Errors
I tried using your url inside a Package.swift file in a local package instead [this worked], and the package doesn’t compile due to these errors:
CodeMirrorWebView.swift:39:43: error: cannot find type 'NSRect' in scope
and
CodeMirrorWebView.swift:39:21: error: initializer does not override a designated initializer from its superclass
It looks like these two lines need to conditionally compile based on when using AppKit, vs using UIKit/SwiftUI.
Something like this would solve that:
There's a third issue with the main module, which I haven't researched/resolved, so I'm using a workaround:
CodeMirrorWebView.swift:98:17: error: value of type 'WKWebView' has no member 'allowsMagnification'
Since WKWebView does not have an
allowsMagnification
property, I commented it out.With these errors corrected, the test module fails:
By commenting out the assertion I did get a successful compile. This is not a final solution but it allows me to try to actually use your package.
I'll let you know how I make out when I swap in your package to my existing app (which uses CodeMirror 5.x).
After making those 3 changes the package successfully compiles
The text was updated successfully, but these errors were encountered: