code-server: [Bug]: Unable to run project on macOS 13
Is there an existing issue for this?
- I have searched the existing issues
Issue Details
I am following the contributing guide
It’s working on Linux without any issues. but on mac, there is an issue with applying the patches.
when I run quilt push -a there are errors.
Am I missing something?
Steps to Reproduce
- Follow the contribution guide on Mac M1
Expected
The patches should be applied
Actual
There are errors and I get a forbidden message when I run code-server on the browser. According to the docs, this happens when the patches are not applied correctly
Logs
Applying patch patches/proposed-api.diff
patching file 'lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts'
Can't backup '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoQQ2sGvMSLk', output is in '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoQQ2sGvMSLk': No such file or directory
patching file 'lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts'
Can't backup '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoQQ2sGvMSLk', output is in '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoQQ2sGvMSLk': No such file or directory
Patch patches/proposed-api.diff appears to be empty; applied
Applying patch patches/marketplace.diff
patching file 'lib/vscode/src/vs/platform/product/common/product.ts'
Can't backup '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoIe3etLqZrR', output is in '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoIe3etLqZrR': No such file or directory
patching file 'lib/vscode/src/vs/server/node/webClientServer.ts'
Can't backup '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoIe3etLqZrR', output is in '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoIe3etLqZrR': No such file or directory
patching file 'lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts'
Can't backup '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoIe3etLqZrR', output is in '/var/folders/f1/bwc053990rg36bl7bc6bv6940000gn/T/patchoIe3etLqZrR': No such file or directory
1 out of 2 hunks failed--saving rejects to 'lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts.rej'
Patch patches/marketplace.diff does not apply (enforce with -f)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 18 (8 by maintainers)
FYI, you can work around this problem by installing GNU patch on a Mac using homebrew:
Be sure to close your existing console window and open a new one after installing it to test this (otherwise it may still use the original Apple “patch”).
I stumbled across this bug while searching for the same error in one of my own projects that uses quilt. The bug appears to be in the macOS 13
patchprogram – it fails with this error if both--backupand--prefixare used and the target to be patched has multiple levels (which often happens withquilt). It happens on my Intel-based Mac, not just an M1 Mac.Here’s a reproducible demonstration of the problem. This works, as you would expect:
However, if you introduce different levels into the patch file, like this:
… then you get the error:
This presumably happens because in the first example, it tries to create the backup file at
patchtemp/tempdir/temp1, and that works fine sincepatchtemp/tempdiralready exists. But in the second case, it tries to create it atpatchtemp/tempdir/patchtemp/temp1, which requires thatpatchmake a temporary directory atpatchtemp/tempdir/patchtempfirst. But it’s instead creating it at/var/folders/nb/2gx6t6wx63b30222g0r47w6c0000gn/T/patchoSGifYqRkQK.This problem is new with macOS 13, so I reported it earlier today to Apple using the Feedback Assistant. I also reported it to https://savannah.nongnu.org/bugs/?group=quilt.
Another workaround would be to run the command inside a docker container.
I had it checked in another macOs Ventura with M1. Same issue.