Skip to content

Conversation

@PaulThompson
Copy link
Owner

No description provided.

@std/log is likely to be removed in the future.
denoland/std#6124
This reverts commit 1ac690c.
- Removed redundant createMockLogger() function (9 lines)
- Updated createMockExecContext to use real loggers from log.getLogger()
- Converted builtin task tests to use execBasic() instead of mock contexts:
  - requireCleanGit task with ignore-unclean flag test
  - requireCleanGit task behavior test
- Now uses proper task setup for builtin git task testing
- Maintains unit test approach for git utility function testing
- Added ✅ REFACTORED badge to git.test.ts
- Added ✅ ALREADY CLEAN badges to remaining utility test files:
  - filesystem.test.ts, process.test.ts, textTable.test.ts, asyncQueue.test.ts, basic.test.ts
- Updated action items to show all mock logger cleanup completed
- Updated action items to show all execBasic conversions completed
- Added comprehensive refactoring completion summary
- Updated critical findings to show issues addressed
- Documented 6 files refactored, 10 files confirmed clean
- All 19 test files now processed and documented

Signed-off-by: Paul Thompson <paul.thompson773@gmail.com>
- Add Windows-specific 50ms delay after file write operations
- Force metadata refresh with Deno.stat() call on Windows
- Prevents test failures due to file system cache returning stale data
- Only applies delay on Windows platform to avoid slowing other systems
- Fix arrow function formatting in Windows timing workaround
- Add debug_windows_timing.ts script for investigating file system timing issues
- Remove trailing whitespace
- Add custom hash function with detailed content and hash logging
- Add custom timestamp function with mtime precision logging
- Add custom uptodate function showing complete comparison logic
- Add enhanced Windows-specific debugging with post-write stats
- Add clear test phase labeling for better CI log analysis
- Will help diagnose exact cause of Windows CI timing failures
- Import TaskContext type from mod.ts
- Replace any type annotation with TaskContext in customUpToDate function
- Maintains type safety while fixing no-explicit-any lint rule
- Increase delay from 50ms to 200ms + 100ms for Windows
- Add multiple file system operations to force cache flush
- Add file read to force content cache refresh
- Add multiple stat calls to detect timestamp updates
- Add file touch operation as last resort to force timestamp update
- Add detailed logging to track exactly when timestamps update
- Should resolve Windows CI timestamp caching issues
Core fix for Windows CI test failures:
- On Windows: Check hash first (reliable) then timestamp (cached)
- On other platforms: Check timestamp first (fast) then hash
- Prevents Windows timestamp caching from causing incorrect up-to-date results
- Simplify test since core fix handles the Windows-specific logic
- All 215 tests pass on Linux, should now pass on Windows CI
- Remove complex custom uptodate function that was duplicating builtin logic incorrectly
- Test now uses the builtin TrackedFile.isUpToDate() method directly
- Builtin method already has Windows-specific hash-first checking
- Simplifies test while ensuring Windows compatibility
- Should resolve Windows CI failures by using the correct platform-aware logic
- Fix lint error: TaskContext type import was no longer needed after removing custom uptodate function
- Clean up imports to only include what's actually used in the test
BREAKING: On Windows, completely ignore timestamp and only use hash for up-to-date checking.

- Windows timestamp caching makes timestamp comparison unreliable
- Hash comparison is content-based and always accurate
- Eliminates timestamp fallback on Windows that was causing false positives
- Other platforms still use fast timestamp + hash fallback approach
- Should definitively resolve Windows CI test failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants