Skip to content

feat: continue Windows implementation #1729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025
Merged

feat: continue Windows implementation #1729

merged 3 commits into from
May 9, 2025

Conversation

cwoolum
Copy link
Collaborator

@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 9 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brandonskiser
Copy link
Collaborator

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
Collaborator Author

cwoolum commented May 8, 2025

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

@cwoolum
Copy link
Collaborator Author

cwoolum commented May 8, 2025

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

@cwoolum
Copy link
Collaborator 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
}

/// The q sockets directory of the local q installation
///
/// - Linux: $XDG_RUNTIME_DIR/cwrun
/// - MacOS: $TMPDIR/cwrun
/// - Windows: %TEMP%\sockets
Copy link
Collaborator

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

@@ -251,6 +264,7 @@ pub fn sockets_dir() -> Result<PathBuf> {
///
/// - Linux: $XDG_RUNTIME_DIR/cwrun
/// - MacOS: $TMPDIR/cwrun
/// - Windows: %TEMP%\sockets
Copy link
Collaborator

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