-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
VSCode/Brackets + Santa cause Xcode autoconfiguration to fail on macOS #4603
Comments
Just tried to update bazel to
I get the same exact error (after a |
I've seen this multiple times before, but haven't been able to reproduce consistently. I believe there's some sort of global state that prevents xcode-locator-bin from being invoked within java. If you Can you try this just to diagnose?
|
fyi @c-parsons @jmmv |
true, I even did that in my initial report !
It takes longer to fail which doesn't look like an improvement to me ;) |
My bad, I missed that part of your report :) Yeah, that seems to match my experience, after a reboot, everything works, but once you clean it gets messed up. I believe that For now the only workaround I know of is to reboot. What I find most interesting about this is that xcode-locator-bin gets called twice, once from xcode_configure.bzl and another time from osx_cc_configure.bzl. By tracing the code and the output of local_cc_config/BUILD, it appears that the call from osx_cc_configure.bzl does indeed work, but the one in xcode_configure.bzl doesn't. |
It'd be that sandboxing is blocking the execution of the
into Just a thought. The fact that an invalid |
I looked into that, but |
@jmmv just tried didn't help I started from a broken state:
|
interestingly, I did High Sierra upgrade on my personal Mac and didn't see this, so it could be something about our Managed Software Update version of XCode in Google's corp Mac setup |
@sergiocampama confirmed by code inspection that the However, we have just discovered something that may be getting in the way. Think... antivirus software and Santa. No good explanation on what exactly is wrong yet though. |
Alright, so it could be that, or... something more crazy: VSCode. It seems that VSCode holds an open file handle on the However, @sergiocampama and myself have confirmed that launching and closing VSCode makes the problem appear and vanish consistently. Add:
to your workspace configuration to ignore the Bazel trees and things will work. (That's why I had never seen this, because I've always had this setting. Removing it made the problem appear pretty quickly.) |
Awesome debugging. To be fair, I had `build symlink_prefix=/` in our shared
bazel.rc for a while, but that made it harder to see outputs and follow
error messages, so we changed it to `symlink_prefix=dist/`. Everyone on the
team already has `dist` ignored in VScode. But for some reason (bug?) the
`bazel-out` folder is not governed by the `symlink_prefix` setting.
…On Thu, Feb 8, 2018 at 2:14 PM Julio Merino ***@***.***> wrote:
Alright, so it could be that, or... something more crazy: VSCode.
It seems that VSCode holds an open file handle on the xcode-locator-bin
file as soon as it's created, which could be blocking executions until
whatever VSCode wants to do completes. This may or may not be a problem in
itself, or it may be a problem only in combination with Santa.
However, @sergiocampama <https://github.com/sergiocampama> and myself
have confirmed that launching and closing VSCode makes the problem appear
and vanish consistently.
Add:
"files.exclude": {"bazel-*": true}
to your workspace configuration to ignore the Bazel trees and things will
work. (That's why I had never seen this, because I've always had this
setting. Removing it made the problem appear pretty quickly.)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4603 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5IwfgHRjNwwJmHcOpPtFpyf4gcFWPks5tS3G2gaJpZM4R9mUp>
.
|
I saw something very similar to that error, and I did have VSCode running at the time. |
so I have |
@sergiocampama |
Several members of the Angular team continue to have this problem occasionally. |
It causes headaches on MacOS High Sierra, see bazelbuild/bazel#4603
It causes headaches on MacOS High Sierra, see bazelbuild/bazel#4603 PR Close #22375
It causes headaches on MacOS High Sierra, see bazelbuild/bazel#4603 PR Close #22375
It causes headaches on MacOS High Sierra, see bazelbuild/bazel#4603 PR Close angular#22375
It causes headaches on MacOS High Sierra, see bazelbuild/bazel#4603 PR Close angular#22375
@jmmv This fails more than occasionally. It's at least 4-5 times per week, meaning on average I have to go through the steps to fix this on a daily basis. It would really help if we could get this fixed. |
@sergiocampama can you please take a look since Julio is on vacation? |
I believe this is something related to some dependency framework that VSCode is built with, as when I tried switching to Brackets the same problem happened. I've also tried with Atom and Sublime 3, and those last 2 work correctly. I don't really know what we can do from this side of the table. We could file a bug against VSCode but I don't expect this to be looked at anytime soon. For my part, I've switched to Sublime 3 and I'm not seeing these errors any more. |
Something related to VSCode may be triggering the problem, yes, but I don’t think we understand the issue well enough to conclude that here is nothing else for us to do here.
I’ve been meaning to dig into this further but haven’t had a chance yet...
…Sent from my iPhone
On Mar 30, 2018, at 00:13, Sergio Campamá ***@***.***> wrote:
I believe this is something related to some dependency framework that VSCode is built with, as when I tried switching to Brackets the same problem happened. I've also tried with Atom and Sublime 3, and those last 2 work correctly.
I don't really know what we can do from this side of the table. We could file a bug against VSCode but I don't expect this to be looked at anytime soon. For my part, I've switched to Sublime 3 and I'm not seeing these errors any more.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Same issue here. I suspected it might have been the following plugin, but it doesn't seem to be the case :/ |
A teammate has a theory that vscode git plugin is the problem. Even without
Bazel-* symlinks, when debugging the editor sees the output folder, then
opens too many file handles.
…On Fri, Mar 30, 2018, 5:22 PM Shanee ***@***.***> wrote:
Same issue here. I suspected it might have been the following plugin, but
it doesn't seem to be the case :/
https://marketplace.visualstudio.com/items?itemName=DevonDCarew.bazel-code
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4603 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5IwfdIYguPHX1H2TDJaw4XGOfgjZ2ks5tjsxhgaJpZM4R9mUp>
.
|
I've just tried disabling git support ( |
I find it surprising if this bug is really only observable in the
intersection of Bazel and VSCode. If it's not a Bazel bug, then presumably
other users of VSCode would observe it also, in some other build tool
(maybe a similar one like Pants?)
…On Mon, Apr 2, 2018 at 7:37 AM Sergio Campamá ***@***.***> wrote:
I've just tried disabling git support ("git.enabled": false) but VSCode
still opens the file.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4603 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5Iwzn5GnyBjpdnf_DTUpD6M6uzxL_ks5tkjergaJpZM4R9mUp>
.
|
I've continued to look into this without much success so far. Some more observations:
|
bazel test
fails on MacOs
Going back to the Santa theory again. I haven't been able to trigger the problem yet with the Santa kernel module unloaded, so I'm increasingly convinced that Santa is messing up the VSCode interaction with these temporary files. From the Santa logs, grepping for
That's it. There is just a At this point, if I keep manually executing
|
I've filed google/santa#260 with Santa to start a discussion with them. |
Confirmed that Santa is causing the failures (see google/santa#260 (comment)). But also figured that Bazel is acting suspiciously in that it's rebuilding |
Oops, didn't want to close this just yet but I the commit message didn't do what I intended. While the Santa issue still remains, I think my recent commit should prevent this problem from happening again. Could anyone try to reproduce by using a HEAD-built Bazel with 5b02559 in it? |
the |
Alright! So the Santa bug was fixed (google/santa#260) and should have rolled out by now. And we did as most as we could on the Bazel side to avoid hitting the bug in the first place (#5196). So I am hoping this is all fixed and can now be closed. |
bazelbuild/bazel#4603 seems to be fixed so these are convenient
Now that bazelbuild/bazel#4603 is resolved, it's convenient to have them again
Now that bazelbuild/bazel#4603 is resolved, it's convenient to have them again
Description of the problem / feature request:
I got an error when trying to build angular (I'm on the Angular team berchet@)
The error is:
Note: I had this working in the past few weeks (& using multiple times a day).
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
On a gMac:
yarn
into the root folder to install depsbazel test packages/core/test/render3
at the rootyarn
andbazel
must be installed viabrew
What operating system are you running Bazel on?
This seems to be the issue, 4 of us ran into this bug after an High Sierra 10.13.3 update
What's the output of
bazel info release
?Have you found anything relevant by searching the web?
I have searched the web and my team-mates, misc info
xcode-select -s /Applications/Xcode.app/Contents/Developer
before rebooting seems to help,bazel clean
you could get into the broken stateThe error seems to originate in this BUILD file:
executing
/private/var/tmp/_bazel_berchet/136114fe9f12514cf56a27652da0b4c4/external/local_config_xcode/./xcode-locator-bin
fromthe CLI returnspermissions are
-rwxr-xr-x
EDIT: Turned out to be an interacction with VSCode, see the fix below
The text was updated successfully, but these errors were encountered: