Skip to content

Conversation

@xiazhvera
Copy link
Contributor

@xiazhvera xiazhvera commented Oct 20, 2025

Issue #, and/or reason for changes (REQUIRED):
Extend platform os help functions. This will be used for future metrics collection.

Description of changes:

  • Add iOS and Android detection. This will introduce behavior change. If user is on iOS/Android will now return as iOS/Android, while it was returned as macOS/Unix.
  • Add function to return platform os string

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.19%. Comparing base (a7e70eb) to head (7a67e77).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
source/system_info.c 33.33% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1225      +/-   ##
==========================================
- Coverage   84.32%   84.19%   -0.13%     
==========================================
  Files          58       58              
  Lines        6078     6093      +15     
==========================================
+ Hits         5125     5130       +5     
- Misses        953      963      +10     

☔ 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.

Comment on lines +82 to +87
AWS_STATIC_STRING_FROM_LITERAL(s_windows_str, "Windows");
AWS_STATIC_STRING_FROM_LITERAL(s_macos_str, "macOS");
AWS_STATIC_STRING_FROM_LITERAL(s_ios_str, "iOS");
AWS_STATIC_STRING_FROM_LITERAL(s_android_str, "Android");
AWS_STATIC_STRING_FROM_LITERAL(s_unix_str, "Unix");
AWS_STATIC_STRING_FROM_LITERAL(s_unknown_str, "Unknown");
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we pick these specific string, where will they be used for?
Maybe add a comment so that we have a source of truth for those hardcoded values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comments to explain the enum and string representations.

@xiazhvera xiazhvera merged commit 062af13 into main Oct 21, 2025
57 checks passed
@xiazhvera xiazhvera deleted the os_string branch October 21, 2025 17:53
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