Skip to content

Conversation

@cwoolum
Copy link
Contributor

@cwoolum cwoolum commented May 7, 2025

Windows Implementation Enhancements

This PR continues the implementation of Windows support for the Amazon Q Developer CLI by adding and improving Windows-specific functionality across several core utility modules.

Changes

Protocol Buffer Support

  • Added Windows-specific implementation for downloading and setting up protoc
  • Created separate functions for Windows and Unix platforms
  • Implemented Windows-specific checksum verification and extraction using PowerShell

Directory Structure

  • Defined Windows directory paths following Windows conventions:
    • Base directory: %LOCALAPPDATA%\Fig
    • Resources: %LOCALAPPDATA%\Fig\resources
    • Managed binaries: %LOCALAPPDATA%\Fig\bin
    • Socket paths: %LOCALAPPDATA%\Fig\sockets\figterm\$SESSION_ID.sock
  • Added Windows-specific implementations for runtime directories and file paths
  • Updated tests to include Windows-specific path assertions

Process Information

  • Fixed Windows process information implementation
  • Added proper error handling for Windows API calls
  • Added Wdk_System_Threading feature to the Windows crate dependency

Manifest Support

  • Added Windows target triples:
    • x86_64-pc-windows-msvc
    • i686-pc-windows-msvc
    • aarch64-pc-windows-msvc
  • Added Windows as a supported OS in the manifest

Code Cleanup

  • Simplified import statements across multiple files
  • Fixed Windows-specific test configurations
  • Improved conditional compilation for cross-platform support

Testing

  • Verified directory paths on Windows
  • Tested protoc download and setup on Windows
  • Ensured process information retrieval works correctly on Windows

Continues work on #153

@cwoolum cwoolum requested a review from a team May 7, 2025 21:13
@codecov-commenter
Copy link

codecov-commenter commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.75%. Comparing base (a87c8f2) to head (d2cc736).
Report is 230 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1729   +/-   ##
=======================================
  Coverage   16.75%   16.75%           
=======================================
  Files         213      213           
  Lines       20704    20704           
  Branches      871      871           
=======================================
  Hits         3468     3468           
  Misses      17236    17236           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brandonskiser
Copy link
Contributor

Thanks for the contribution! Can you run cargo +nightly fmt? I recommend always doing a cargo +nightly fmt and cargo clippy --locked --color always -- -D warnings for PR's, this should be part of the git commit hooks if you went through the onboarding in the README (not sure if it's available for windows though).

@cwoolum
Copy link
Contributor Author

cwoolum commented May 8, 2025

Hey @brandonskiser, sorry about that! I've made the fixes

@cwoolum
Copy link
Contributor Author

cwoolum commented May 8, 2025

Oh, just saw the other comments as well. I'll get those changes added

@cwoolum
Copy link
Contributor Author

cwoolum commented May 8, 2025

@brandonskiser , made all of the requested changes. Let me know if I need to tweak anything else!

@cwoolum cwoolum enabled auto-merge (squash) May 9, 2025 01:51
///
/// - Linux: $XDG_RUNTIME_DIR/cwrun
/// - MacOS: $TMPDIR/cwrun
/// - Windows: %TEMP%\sockets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - comment doesn't match the actual implementation

///
/// - Linux: $XDG_RUNTIME_DIR/cwrun
/// - MacOS: $TMPDIR/cwrun
/// - Windows: %TEMP%\sockets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, along with other comments

@cwoolum cwoolum merged commit 0b28e58 into aws:main May 9, 2025
11 checks passed
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.

3 participants