flushChangesLocked should only be called with s.pendingFileChangesMu held.
(ctx context.Context)
| 1441 | |
| 1442 | // flushChangesLocked should only be called with s.pendingFileChangesMu held. |
| 1443 | func (s *Session) flushChangesLocked(ctx context.Context) (FileChangeSummary, map[tspath.Path]*Overlay) { |
| 1444 | if len(s.pendingFileChanges) == 0 { |
| 1445 | return FileChangeSummary{}, s.fs.Overlays() |
| 1446 | } |
| 1447 | |
| 1448 | start := time.Now() |
| 1449 | changes, overlays := s.fs.processChanges(s.pendingFileChanges) |
| 1450 | if s.options.LoggingEnabled { |
| 1451 | s.logger.Log(fmt.Sprintf("Processed %d file changes in %v", len(s.pendingFileChanges), time.Since(start))) |
| 1452 | } |
| 1453 | s.pendingFileChanges = nil |
| 1454 | return changes, overlays |
| 1455 | } |
| 1456 | |
| 1457 | // logProjectChanges logs information about projects that have changed between snapshots |
| 1458 | func (s *Session) logProjectChanges(oldSnapshot *Snapshot, newSnapshot *Snapshot) { |
no test coverage detected