@@ -176,6 +176,7 @@ class NextCompiler {
176
176
let baseOptionsToAdd = [ " -o " , object, " -DDEBUG " , " -DINJECTING " ]
177
177
let languageSpecific = ( isSwift ?
178
178
[ " -c " , " -filelist " , filesfile, " -primary-file " , source,
179
+ " -warn-long-expression-type-checking=150 " ,
179
180
" -external-plugin-path " ,
180
181
platformUsr+ " lib/swift/host/plugins# " +
181
182
platformUsr+ " bin/swift-plugin-server " ,
@@ -189,13 +190,18 @@ class NextCompiler {
189
190
// Call compiler process
190
191
if let errors = Popen . task ( exec: compiler,
191
192
arguments: stored. arguments + languageSpecific,
192
- cd: stored. workingDir, errors: nil ) , // Always returns stdout
193
- errors. contains ( " error: " ) {
194
- print ( ( [ compiler] + stored. arguments +
195
- languageSpecific) . joined ( separator: " " ) )
196
- _ = error ( " Recompile failed for: \( source) \n " + errors)
197
- lastError = errors
198
- return nil
193
+ cd: stored. workingDir, errors: nil ) { // Always returns stdout
194
+ if errors. contains ( " error: " ) {
195
+ print ( ( [ compiler] + stored. arguments +
196
+ languageSpecific) . joined ( separator: " " ) )
197
+ _ = error ( " Recompile failed for: \( source) \n " + errors)
198
+ lastError = errors
199
+ return nil
200
+ }
201
+ for slow : String in errors [
202
+ #"(?<=/)\w+\.swift:\d+:\d+: warning: expression took \d+ms to type-check.*"# ] {
203
+ log ( slow)
204
+ }
199
205
}
200
206
201
207
return object
0 commit comments