| 272 | } |
| 273 | |
| 274 | func NewProgram(opts ProgramOptions) *Program { |
| 275 | p := &Program{opts: opts} |
| 276 | if p.opts.Tracing != nil { |
| 277 | defer p.opts.Tracing.Push(tracing.PhaseProgram, "createProgram", map[string]any{"configFilePath": opts.Config.CompilerOptions().ConfigFilePath}, true)() |
| 278 | } |
| 279 | p.processedFiles = processAllProgramFiles(p.opts, p.SingleThreaded()) |
| 280 | p.initCheckerPool() |
| 281 | p.verifyCompilerOptions() |
| 282 | return p |
| 283 | } |
| 284 | |
| 285 | // Return an updated program for which it is known that only the file with the given path has changed. |
| 286 | // In addition to a new program, return a boolean indicating whether the data of the old program was reused. |