-
Notifications
You must be signed in to change notification settings - Fork 905
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
Remove remaining dependencies using download_rust_deps #19300
Conversation
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.
++ for CODEOWNERS
@@ -1065,6 +1065,7 @@ Object.defineProperty(Config.prototype, 'defaultOptions', { | |||
let env = Object.assign({}, process.env) | |||
env = this.addPathToEnv(env, path.join(this.depotToolsDir, 'python-bin'), true) | |||
env = this.addPathToEnv(env, path.join(this.depotToolsDir, 'python2-bin'), true) | |||
env = this.addPathToEnv(env, path.join(this.srcDir, 'third_party', 'rust-toolchain', 'bin'), true) |
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.
do you really need this? We should not add new things into PATH
if possible.
Can't you use the full path in places where you need to call something from this dir?
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.
Yes, otherwise cargo can't find rustc or it will use local rustc which could be the wrong version. This ensures that we're always using the upstream rust toolchain. I do use the full path to cargo, but cargo uses PATH to find rustc and I didn't see an option to pass the path for it
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.
we should remove audit_deps
from gn files. It doesn't make sense to keep it there, because this target is only called from an npm command and it doesn't require any build dependency.
a follow up to cleanup this would be nice.
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.
cargo can't find rustc or it will use local rustc which could be the wrong version
cargo is supposed to respect a RUSTC
env variable. Maybe setting that in the build context would be less invasive than altering the path?
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.
@rillian well I think either one has the same fundamental issue, the problem is that @goodov doesn't want to add things here in general because it makes it harder to run gn
without using npm. I think the fix here is just to move audit deps out of gn like he suggested. Unless there's some way to specific RUSTC on the command line other than RUSTC=.... cargo ...
because I don't believe you can do that with a gn action. It may be good for the script only version though.
args = [ | ||
rebase_path(cargo_exe), | ||
"build", | ||
"--release", |
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.
How are we feeling about --locked
/--frozen
this week?
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.
Good question, I just used the same command that upstream recommended for gnrt
. I guess this could have the same issues as we had with the old download_rust_deps script so maybe we should use locked here?
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.
Seems like each have their own failure mode. I'm fine with it either way.
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.
Is it failing with an error or failing silently on auditor
fail?
The change seems sound to me, for the rest
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.
script/audit_deps.py
changes look good.
Remove remaining dependencies using download_rust_deps
Remove remaining dependencies using download_rust_deps
….57.x). (#19447) * Merge pull request #18955 from brave/cargo-rustc-cr115 Convert to rust_static_lib * fix patch to exclude compiler builtins for linux arm64 (#19118) don't use compiler_builtins for linux arm64 because the prebuilt library doesn't exist yet in upstream * Merge pull request #19125 from brave/issues/31415 Use Brave forked version of futures-retry * Merge pull request #19132 from brave/win-prebuilt-fix add win arm64 back in temporarily until we get the llvm update with t… * Merge pull request #19232 from brave/rust-dep-fixup Rust dep fixup * Merge pull request #19300 from brave/rust-dep-cleanup-2 Remove remaining dependencies using download_rust_deps * Merge pull request #19320 from brave/rust-dep-cleanup-3 * Merge pull request #19339 from brave/win-rust-asan-fix upstream patch https://chromium-review.googlesource.com/c/chromium/sr… * Fix __rust_dealloc on Windows. (#19116) * Merge pull request #19322 from brave/audit-branding-fix audit_deps needs branding for some reason * Merge pull request #19426 from brave/rust-unsafe-fn * Merge pull request #18808 from brave/cr116 Upgrade from Chromium 115 to Chromium 116 * Merge pull request #19453 from brave/android_text_view_id_conflict_fix [C116] [Android] Fix for the `text_view` id conflict * Fix loading.desktop.brave after cr116 (#19450) * Fix loading.desktop.brave after cr116 * Fix lint errors * Merge pull request #19455 from brave/maxk-fix-narrow-settings-menu [cr116 follow-up] Fixes narrow settings menu button. * Merge pull request #19457 from brave/maxk-disable-kOptimizationGuideFetchingForSRP [cr116 follow-up] Disables kOptimizationGuideFetchingForSRP feature. * Merge pull request #19458 from brave/maxk-fix-brave-toolbar [cr116 follow-up] Fixes toolbar buttons misalignment. * Update padding after brave toolbar is initialized (#19484) As we're not updating padding during in the middle of initialization, we should do it after it finishes. * Fix broken on-demand updates on Windows (#19469) --------- Co-authored-by: Brian Johnson <[email protected]> Co-authored-by: Aleksey Khoroshilov <[email protected]> Co-authored-by: samartnik <[email protected]> Co-authored-by: Mikhail <[email protected]> Co-authored-by: Sangwoo Ko <[email protected]> Co-authored-by: Michael Herrmann <[email protected]>
Resolves brave/brave-browser#31658
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: