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
return"the manifest is missing a Swift tools version specification; consider prepending to the manifest '// swift-tools-version:\(ToolsVersion.currentToolsVersion)' to specify the current Swift toolchain version as the lowest supported version by the project; if such a specification already exists, consider moving it to the top of the manifest, or prepending it with '//' to help Swift Package Manager find it"
198
-
case.missingLabel:
199
-
return"the Swift tools version specification is missing a label; consider inserting 'swift-tools-version:' between the comment marker and the version specifier"
200
-
case.missingVersionSpecifier:
201
-
// If the version specifier is missing, then its terminator must be missing as well. So, there is nothing in between the version specifier and everything that should be in front the version specifier. So, appending a valid version specifier will fix this error.
202
-
return"the Swift tools version specification is missing a version specifier; consider appending '\(ToolsVersion.currentToolsVersion)' to the line to specify the current Swift toolchain version as the lowest supported version by the project"
203
-
caselet.commentMarker(commentMarker):
204
-
return"the comment marker '\(commentMarker)' is malformed for the Swift tools version specification; consider replacing it with '//'"
205
-
caselet.label(label):
206
-
return"the Swift tools version specification's label '\(label)' is malformed; consider replacing it with 'swift-tools-version:'"
207
-
caselet.versionSpecifier(versionSpecifier):
208
-
return"the Swift tools version '\(versionSpecifier)' is not valid; consider replacing it with '\(ToolsVersion.currentToolsVersion)' to specify the current Swift toolchain version as the lowest supported version by the project"
return"the manifest is missing a Swift tools version specification; consider prepending to the manifest '// swift-tools-version:\(ToolsVersion.currentToolsVersion)' to specify the current Swift toolchain version as the lowest supported version by the project; if such a specification already exists, consider moving it to the top of the manifest, or prepending it with '//' to help Swift Package Manager find it"
185
+
case.isMisspelt(let misspeltCommentMarker):
186
+
return"the comment marker '\(misspeltCommentMarker)' is misspelt for the Swift tools version specification; consider replacing it with '//'"
187
+
}
188
+
case.label(let malformationDetails):
189
+
switch malformationDetails {
190
+
case.isMissing:
191
+
return"the Swift tools version specification is missing a label; consider inserting 'swift-tools-version:' between the comment marker and the version specifier"
192
+
case.isMisspelt(let misspeltLabel):
193
+
return"the Swift tools version specification's label '\(misspeltLabel)' is misspelt; consider replacing it with 'swift-tools-version:'"
194
+
}
195
+
case.versionSpecifier(let malformationDetails):
196
+
switch malformationDetails {
197
+
case.isMissing:
198
+
// If the version specifier is missing, then its terminator must be missing as well. So, there is nothing in between the version specifier and everything that should be in front the version specifier. So, appending a valid version specifier will fix this error.
199
+
return"the Swift tools version specification is missing a version specifier; consider appending '\(ToolsVersion.currentToolsVersion)' to the line to specify the current Swift toolchain version as the lowest supported version by the project"
200
+
case.isMisspelt(let misspeltVersionSpecifier):
201
+
return"the Swift tools version '\(misspeltVersionSpecifier)' is misspelt or otherwise invalid; consider replacing it with '\(ToolsVersion.currentToolsVersion)' to specify the current Swift toolchain version as the lowest supported version by the project"
202
+
}
209
203
}
210
204
// FIXME: The error messages probably can be more concise, while still hitting all the key points.
0 commit comments