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
Scan error when variable has Chinese comment like this:
import Foundation
struct AgeModel {
var ageDesc: String // 年龄的描述
}
Error is:
➜ debug sourcery -v
Using configuration file at '.sourcery.yml'
Resolving configurations took 0.0025709867477416992
Scanning sources...
Swift/StringCharacterView.swift:158: Fatal error: String index is out of bounds
[1] 94313 illegal hardware instruction sourcery -v
I am analyzing this issue, and it seems like it has nothing to do with the comment, instead, AnnotationParser crashes on this line: .substring(to: max(0, lineInfo.character - 1)) while trying to evaluate spaces in front of var ageDesc: String statement. Seems like lines are miscalculated, and an empty line is passed to AnnotationParser's inlineFrom.
I'll keep you posted, I plan to resolve this today.
Finished investigation: this is actually fixed in #1171 which seemed to be unrelated, but it is about how lines are parsed. Before they were against Swift grammar, and now they are parsed line SwiftSyntax would parse them.
Scan error when variable has Chinese comment like this:
Error is:
sourcery config is:
my templates is:
sourcery version is: 2.0.0, installed by brew
Success after remove Chinese comments or change to English, but there are too many Chinese comments .
The text was updated successfully, but these errors were encountered: