File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -112,23 +112,30 @@ private func pluginPaths(relativeTo base: URL) -> PluginPaths? {
112
112
package var sourceKitPluginPaths : PluginPaths {
113
113
get throws {
114
114
struct PluginLoadingError : Error , CustomStringConvertible {
115
- var description : String =
116
- " Could not find SourceKit plugin. Ensure that you build the entire SourceKit-LSP package before running tests. "
115
+ let searchBase : URL
116
+ var description : String {
117
+ """
118
+ Could not find SourceKit plugin. Ensure that you build the entire SourceKit-LSP package before running tests.
119
+
120
+ Searching for plugin relative to \( searchBase)
121
+ """
122
+ }
117
123
}
118
124
119
- var base =
125
+ let base =
120
126
if let pluginPaths = ProcessInfo . processInfo. environment [ " SOURCEKIT_LSP_TEST_PLUGIN_PATHS " ] {
121
127
URL ( fileURLWithPath: pluginPaths)
122
128
} else {
123
129
xctestBundle
124
130
}
125
- while base. pathComponents. count > 1 {
126
- if let paths = pluginPaths ( relativeTo: base) {
131
+ var searchPath = base
132
+ while searchPath. pathComponents. count > 1 {
133
+ if let paths = pluginPaths ( relativeTo: searchPath) {
127
134
return paths
128
135
}
129
- base = base . deletingLastPathComponent ( )
136
+ searchPath = searchPath . deletingLastPathComponent ( )
130
137
}
131
138
132
- throw PluginLoadingError ( )
139
+ throw PluginLoadingError ( searchBase : base )
133
140
}
134
141
}
You can’t perform that action at this time.
0 commit comments