Skip to content
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

feat(unstable): add Deno.getUid #13496

Merged
merged 4 commits into from
Jan 31, 2022
Merged

feat(unstable): add Deno.getUid #13496

merged 4 commits into from
Jan 31, 2022

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Jan 26, 2022

closes #13493

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

@kt3k looks good, I have two nitpicks:
a) maybe use Deno.getUid()?
b) should we add Deno.getGid() too?

@kt3k
Copy link
Member Author

kt3k commented Jan 26, 2022

@bartlomieju

a) maybe use Deno.getUid()?

I'm not strongly against that. I chose this name because we tend to use linux syscall names as is. ex. chmod, chdir, lstat, utime, futime, flock, funlock, etc

If we try to make it more descriptive, I guess Deno.getUserId might be another option. (similar to Deno.makeTempDir instead of Deno.mktemp)

I'd like to hear more opinions from other members

b) should we add Deno.getGid() too?

I think we should. That's also useful for more precise implementation of fs.access

@bartlomieju
Copy link
Member

@kt3k sounds good!

@kt3k kt3k requested review from ry and piscisaureus January 26, 2022 11:21
@kt3k kt3k changed the title feat(unstable): add Deno.getuid feat(unstable): add Deno.getUid Jan 27, 2022
@kt3k kt3k merged commit 49a0db0 into denoland:main Jan 31, 2022
@kt3k kt3k deleted the feat/unstable-getuid branch January 31, 2022 05:44
ry pushed a commit to ry/deno that referenced this pull request Feb 3, 2022
bartlomieju pushed a commit that referenced this pull request Feb 3, 2022
@jorroll
Copy link
Contributor

jorroll commented Feb 5, 2022

FWIW, I initially interpreted Deno.getUid() as "get unique ID". Though hopefully, when hovering over the method in VSCode, I would have noticed the JSDoc comment if I ran across this in an application. Its usage context might also have cleared up any confusion.

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.

proposal: Deno.getUid()
3 participants