Skip to content

[Bug]: Unable to run project on macOS 13 #5770

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

Closed
1 task done
rahulshinde11 opened this issue Nov 10, 2022 · 18 comments
Closed
1 task done

[Bug]: Unable to run project on macOS 13 #5770

rahulshinde11 opened this issue Nov 10, 2022 · 18 comments
Labels
bug Something isn't working upstream Needs to be fixed upstream

Comments

@rahulshinde11
Copy link

rahulshinde11 commented Nov 10, 2022

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

  1. 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)
@rahulshinde11 rahulshinde11 added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Nov 10, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

Hmm 🤔 Looking into this right now. I'm on macOS (Intel).

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

image

This is strange. I'm seeing similar behavior. Maybe #5751 didn't get applied correctly. I will update the patches now.

@rahulshinde11
Copy link
Author

rahulshinde11 commented Nov 10, 2022

I tried in the release/v4.8.2 branch

image

Looks like it has the same issue, can the quilt tool be incompatible? I'm on macOs Ventura

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

False alarm. I did a fresh clone and it all works. Can you please try on main? I believe main and release/v4.8.2 point to different submodule commits so you'll need to make sure you run git submodule update --init after switching branches

@rahulshinde11
Copy link
Author

I did a fresh clone, same issue.

image

@rahulshinde11
Copy link
Author

rahulshinde11 commented Nov 10, 2022

I had it checked in another macOs Ventura with M1. Same issue.
image

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

Hmm...I wonder if this is only an issue on M1 then.

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

I couldn't find any related bugs here: http://savannah.nongnu.org/bugs/?group=quilt

@rahulshinde11
Copy link
Author

M1 users using quilt might be less

@ChandanWarad
Copy link

ChandanWarad commented Nov 10, 2022

Screenshot 2022-11-11 at 12 01 17 AM

Facing same issue on M1 macOS version 13.

@rahulshinde11 rahulshinde11 changed the title [Bug]: Unable to run project on Mac [Bug]: Unable to run project on Mac with M1 Nov 10, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

What version of quilt are you running? I'm running 0.67

@rahulshinde11
Copy link
Author

rahulshinde11 commented Nov 10, 2022

What version of quilt are you running? I'm running 0.67

same, installed using brew install quilt

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

Hmm..what shell are you using? I'm not sure what that backup error is. Do you want to raise an issue in quilt? That might be the best next step

@rahulshinde11
Copy link
Author

rahulshinde11 commented Nov 12, 2022

I use zsh, do I need to register on the link you sent and raise an issue? I can't find the project on github

@robertmathews
Copy link

robertmathews commented Nov 14, 2022

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 patch program -- it fails with this error if both --backup and --prefix are used and the target to be patched has multiple levels (which often happens with quilt). 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:

mkdir patchtemp
echo 123456 > patchtemp/temp1
echo 1234x6 > patchtemp/temp2
cd patchtemp
diff -u temp1 temp2 > temp.patch
mkdir tempdir
patch --backup --prefix=tempdir/ -i temp.patch

However, if you introduce different levels into the patch file, like this:

mkdir patchtemp
echo 123456 > patchtemp/temp1
echo 1234x6 > patchtemp/temp2
diff -u patchtemp/temp1 patchtemp/temp2 > patchtemp/temp.patch
mkdir patchtemp/tempdir
patch --backup --prefix=patchtemp/tempdir/ -i patchtemp/temp.patch

... then you get the error:

Can't backup '/var/folders/nb/2gx6t6wx63b30222g0r47w6c0000gn/T/patchoSGifYqRkQK', output is in '/var/folders/nb/2gx6t6wx63b30222g0r47w6c0000gn/T/patchoSGifYqRkQK': No such file or directory

This presumably happens because in the first example, it tries to create the backup file at patchtemp/tempdir/temp1, and that works fine since patchtemp/tempdir already exists. But in the second case, it tries to create it at patchtemp/tempdir/patchtemp/temp1, which requires that patch make a temporary directory at patchtemp/tempdir/patchtemp first. 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.

@robertmathews
Copy link

FYI, you can work around this problem by installing GNU patch on a Mac using homebrew:

brew install gpatch

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").

@rahulshinde11 rahulshinde11 changed the title [Bug]: Unable to run project on Mac with M1 [Bug]: Unable to run project on macOS 13 Nov 17, 2022
@rahulshinde11
Copy link
Author

Another workaround would be to run the command inside a docker container.

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 30, 2022

do I need to register on the link you sent and raise an issue? I can't find the project on github

EDIT: Looks like @robertmathews did, thank you!

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2024
@code-asher code-asher added upstream Needs to be fixed upstream and removed triage This issue needs to be triaged by a maintainer labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Needs to be fixed upstream
Projects
None yet
Development

No branches or pull requests

5 participants