Skip to content

feat: add Windows support for os shim #1714

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 1 commit into from
May 6, 2025
Merged

feat: add Windows support for os shim #1714

merged 1 commit into from
May 6, 2025

Conversation

cwoolum
Copy link
Collaborator

@cwoolum cwoolum commented May 6, 2025

Summary

This PR adds Windows support to the OS shim layer, enabling the Amazon Q Developer CLI to run natively on Windows platforms. This is a significant enhancement to our cross-platform compatibility and addresses user requests from the Windows
discussion thread.

Changes

• Implemented Windows-specific OS operations in the OS shim layer
• Added conditional compilation for Windows-specific code paths
• Ensured file path handling works correctly on Windows systems
• Maintained compatibility with existing Linux and macOS implementations

Testing

• Verified functionality on Windows 11
• Confirmed that existing Linux and macOS functionality remains intact
• Added new unit tests to verify Windows functionality

Related Issues

Continues work on #153

@cwoolum cwoolum requested a review from a team May 6, 2025 23:09
#[cfg(windows)]
{
// Basic path joining
assert_append!("C:\\abc\\test", "test", "C:\\abc\\test\\test");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure of the actual intent of joining two absolute paths. Is this still relevant for Windows?

fs.remove_dir_all(&dir_link_path).await.unwrap();
fs.remove_dir_all(&dir_link_sync_path).await.unwrap();
},
Err(e) if e.kind() == std::io::ErrorKind::PermissionDenied || e.raw_os_error() == Some(1314) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I catch permissions issues for tests so that VSCode doesn't need to be run as an admin but we can change this to force it. Another option is to just ensure that there are required permissions when pipeline actions run.

@chaynabors chaynabors merged commit 2a9e681 into aws:main May 6, 2025
chaynabors pushed a commit that referenced this pull request May 9, 2025
Co-authored-by: Woolum <woolumc@amazon.com>
chaynabors added a commit that referenced this pull request May 12, 2025
* Update login copy

* chore: fix path to the dashboard README (#1696)

* feat: add Windows support for os shim (#1714)

Co-authored-by: Woolum <woolumc@amazon.com>

* start telemetry, state, and settings refactor

* finish rewrite

* finish rewrite

* finish rewrite (actually?)

* change profile set copy

* fix spellcheck lint

---------

Co-authored-by: Kyosuke Konishi <86059523+Konippi@users.noreply.github.com>
Co-authored-by: Chris Woolum <christopher.woolum@gmail.com>
Co-authored-by: Woolum <woolumc@amazon.com>
brandonskiser pushed a commit that referenced this pull request May 12, 2025
* Update login copy

* chore: fix path to the dashboard README (#1696)

* feat: add Windows support for os shim (#1714)

Co-authored-by: Woolum <woolumc@amazon.com>

* start telemetry, state, and settings refactor

* finish rewrite

* finish rewrite

* finish rewrite (actually?)

* change profile set copy

* fix spellcheck lint

* finish chat persistence

---------

Co-authored-by: Kyosuke Konishi <86059523+Konippi@users.noreply.github.com>
Co-authored-by: Chris Woolum <christopher.woolum@gmail.com>
Co-authored-by: Woolum <woolumc@amazon.com>
chaynabors added a commit that referenced this pull request May 12, 2025
* Update login copy

* chore: fix path to the dashboard README (#1696)

* feat: add Windows support for os shim (#1714)

Co-authored-by: Woolum <woolumc@amazon.com>

* start telemetry, state, and settings refactor

* finish rewrite

* finish rewrite

* finish rewrite (actually?)

* change profile set copy

* fix spellcheck lint

* finish chat persistence

* chore: update rust dependencies

---------

Co-authored-by: Kyosuke Konishi <86059523+Konippi@users.noreply.github.com>
Co-authored-by: Chris Woolum <christopher.woolum@gmail.com>
Co-authored-by: Woolum <woolumc@amazon.com>
cwoolum added a commit to cwoolum/amazon-q-developer-cli that referenced this pull request May 13, 2025
* Update login copy

* chore: fix path to the dashboard README (aws#1696)

* feat: add Windows support for os shim (aws#1714)

Co-authored-by: Woolum <woolumc@amazon.com>

* start telemetry, state, and settings refactor

* finish rewrite

* finish rewrite

* finish rewrite (actually?)

* change profile set copy

* fix spellcheck lint

* finish chat persistence

---------

Co-authored-by: Kyosuke Konishi <86059523+Konippi@users.noreply.github.com>
Co-authored-by: Chris Woolum <christopher.woolum@gmail.com>
Co-authored-by: Woolum <woolumc@amazon.com>
cwoolum added a commit to cwoolum/amazon-q-developer-cli that referenced this pull request May 13, 2025
* Update login copy

* chore: fix path to the dashboard README (aws#1696)

* feat: add Windows support for os shim (aws#1714)

Co-authored-by: Woolum <woolumc@amazon.com>

* start telemetry, state, and settings refactor

* finish rewrite

* finish rewrite

* finish rewrite (actually?)

* change profile set copy

* fix spellcheck lint

* finish chat persistence

* chore: update rust dependencies

---------

Co-authored-by: Kyosuke Konishi <86059523+Konippi@users.noreply.github.com>
Co-authored-by: Chris Woolum <christopher.woolum@gmail.com>
Co-authored-by: Woolum <woolumc@amazon.com>
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