Upgrade whoami to 2.1 and handle username retrieval errors #19
+20
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade the
whoamicrate from version 1.5 to 2.1, which introduces a breaking API change wherewhoami::username()now returns aResultinstead of aString. This PR updates the dependency and handles the potential error case gracefully.Changes
whoamidependency from 1.5 to 2.1 inpackages/core/Cargo.tomlCargo.lockto reflect newwhoami2.1.0 and its transitive dependencies:wasiteupgraded from 0.1.0 to 1.0.2wasipinned to 0.11.1+wasi-snapshot-preview1 in existing dependencieswasi0.14.7+wasi-0.2.4 added as a dependency ofwasitedefault_user()function inpackages/core/src/host/schema.rsto handle theResultreturn type by providing a fallback value of"user"when username retrieval failsType of Change
Testing
Describe how you tested your changes:
just test-rust)just lint)Checklist
Related Issues
N/A
https://claude.ai/code/session_01FjPuTe8aJr25G84ScsaTvn