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

fix: Move temp folder instead of renaming #83

Closed
wants to merge 2 commits into from

Conversation

mxdvl
Copy link

@mxdvl mxdvl commented Aug 27, 2023

What does this change?

Use move method from std/fs, which returns the correct errors for existing files.

Why?

Fixes #82

There may be a deeper issue, which is that we do not get the correct underlying error from the filesystem:

https://github.com/denoland/deno_core/blob/69891d0685d8e0ab5d80d6e3204c241796046a30/core/error_codes.rs#L50C52-L50C52

@mxdvl mxdvl force-pushed the patch-1 branch 5 times, most recently from ebee61e to de7a96f Compare August 28, 2023 07:50
.vscode/settings.json Outdated Show resolved Hide resolved
As nodeModulesDirForPackageInner is asynchronous and contains
several `await` calls, the file can be created after the first
check for existence.

The error thrown by `Deno.rename` is not an instance of
`Deno.errors.AlreadyExists`, but `move` does work as expected.
Tested on macOS (OS error 66) and linux (OS error 39)
ensure behaviour is kept as-is,
to make review process easier
@mxdvl
Copy link
Author

mxdvl commented Dec 21, 2023

Any chance you could get a look @lucacasonato?

@marvinhagemeister marvinhagemeister changed the title Move temp folder instead of renaming fix: Move temp folder instead of renaming Jan 2, 2024
@marvinhagemeister marvinhagemeister enabled auto-merge (squash) January 2, 2024 09:33
@marvinhagemeister marvinhagemeister enabled auto-merge (squash) January 2, 2024 09:34
@mxdvl
Copy link
Author

mxdvl commented Jan 2, 2024

Thanks @marvinhagemeister, wasn’t sure if you were a maintainer as well! I think someone will need to approve the actions for them to run on this PR. Alternatively, recreating my branch in this repo–as opposed to the fork–should also trigger them.

@marvinhagemeister
Copy link
Collaborator

@lucacasonato Do you have an idea why the CI is not getting triggered?

@mxdvl
Copy link
Author

mxdvl commented Jan 3, 2024

@lucacasonato Do you have an idea why the CI is not getting triggered?

If there’s no button to “approve workflows” as per the docs, I think the second-best approach is to own the changes yourselves. You could achieve this by copying the mxdvl:patch-1 branch over to this repo.

Feel free to recreate this PR or cherry-pick those commits yourselves, by the way, authorhip of the change is less important that the fix actually going out! 🙇

@lucacasonato lucacasonato reopened this Jan 3, 2024
@mxdvl
Copy link
Author

mxdvl commented Jan 3, 2024

All green now. I don't have the power to merge so either of you will have to do it.

@marvinhagemeister
Copy link
Collaborator

I'm currently investigating this. We found a reproduction case, but the changes in this PR don't seem to fully fix it.

@lucacasonato
Copy link
Owner

Fixed by #107

@mxdvl mxdvl deleted the patch-1 branch January 23, 2024 15:16
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.

Renaming temp folder errors on Github Actions
3 participants