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

suggestion: move Deno.flock() and friends #22178

Closed
iuioiua opened this issue Jan 29, 2024 · 2 comments · Fixed by #22235
Closed

suggestion: move Deno.flock() and friends #22178

iuioiua opened this issue Jan 29, 2024 · 2 comments · Fixed by #22235

Comments

@iuioiua
Copy link
Contributor

iuioiua commented Jan 29, 2024

I suggest we remove the following APIs in favour of new Deno.FsFile methods:

  1. Deno.flock() > Deno.FsFile.lock()
  2. Deno.flockSync() > Deno.FsFile.lockSync()
  3. Deno.funlock() > Deno.FsFile.unlock()
  4. Deno.funlockSync() > Deno.FsFile.unlockSync()

The reasoning is the same as other recent deprecations; they accept rid parameters, and we want to make these private.

Alternatively, if these aren't seen as useful, we can remove them. We should be fine to move or remove them, as they are part of the unstable API.

@bartlomieju
Copy link
Member

This seems reasonable 👍 we should add new methods to Deno.FsFile and mark them unstable; in the next minor release mark the new APIs as stable, and the old APIs as deprecated.

@iuioiua
Copy link
Contributor Author

iuioiua commented Feb 2, 2024

Cool. Please assign this issue to me.

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 a pull request may close this issue.

2 participants