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: use xib file to construct macOS Menu #20615
Conversation
fb0a0e3
to
d8ac67a
Compare
Not a review but some thoughts , the reason chrome is doing this refactor is they are trying to remove dependency on system XCode and make builds deterministic https://bugs.chromium.org/p/chromium/issues/detail?id=330262, which again aligns with one of our upcoming projects from security WG , making electron builds deterministic. Once this transition is complete on chrome end and we still deviate from it then its going to be a technical debt similar to libc++ one which I would like to avoid at all cost. So reiterating on this PR, I would suggest to look into the programmatic implementation or revisit the position of this api through the API WG. |
Thanks for the context @deepak1556! Since this is just a dependency on In general I agree with wanting to drop Xcode as a dependency, and aligning with Chromium, but this doesn't seem like it would impact our ability to produce deterministic builds. Additionally, doing this programmatically requires calling private APIs which may or may not be rejected by MAS. |
This is also my primary consideration here; i'd rather have the system handle this where possible and not endanger users' ability to ship via the mac app store. At the very least, i'd like to get this into versions where it's supposed to work and then perhaps consider deprecating it in future versions when Chromium does totally drop Xcode 🤔 |
Sorry for the delayed response, comments inline.
Yeah dependency on ibtool is fine, it used to be non-deterministic in the past. I was originally worried about a situation when chromium gets rid of all its xib files, they would start shipping the minimal set of binaries and SDK for the build. We would have to rely on the system installation for this one, but since it doesn't change the determinism of the build, should be ok!
Moving forward, implementations that require this should be considered by the API WG and see if it can be made as a userland module or expose the right parts to make it possible. |
@deepak1556 do you wish for the API group to vote on this PR, or are you comfortable with this PR as it stands and wish for us to vote on future PRs affecting similar build components? |
@codebytere sorry my comment wasn't clear, I was talking about future PR's . This one is good as it stands 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with nits
42c59be
to
b96d3f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Release Notes Persisted
|
I was unable to backport this PR to "6-1-x" cleanly; |
I have automatically backported this PR to "7-0-x", please check out #20670 |
Could someone manually back-port this to 6.1.x? Doesn't look like it showed up in the latest release. |
@codebytere has manually backported this PR to "6-1-x", please check out #20885 |
Description of Change
Resolves #20503.
When we removed the
.xib
file menu construction, it unfortunately nuked therecentDocuments
role, which unexpectedly is near-impossible to replicate manually with obj-c without doing terrifying hacky things or using private APIs (see this blog post). As a result, our only real path forward here was to revert to xib-based functionality removed originally removed in this commit. I needed to re-implement the xib template in GN removed upstream but otherwise I mostly just needed to re-add the xib file and revert to the olderrecentDocuments
menu role business logic in themenu_controller
.Tested to work with this repro case.
cc @MarshallOfSound @nornagon (& @bigtimebuddy!)
Checklist
npm test
passesRelease Notes
Notes: Fixed a regression in the
recentDocuments
role on macOS.