Skip to content
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

Update filecoin-cxx deps, mainly multihash #25553

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

cdesouza-chromium
Copy link
Collaborator

@cdesouza-chromium cdesouza-chromium commented Sep 13, 2024

This change is a first pass in getting the dependecies for filecoin-cxx updated, to eventually be able to drop the unmaintained crate proc-macro-error.

This change updates multihash to v0.16.3->v0.18.1. In a follow up PR, the goal will be to deploy v0.19.1, which drops the unwanted crate as a transient dependency.

Resolves brave/brave-browser#40947

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@cdesouza-chromium cdesouza-chromium self-assigned this Sep 13, 2024
@github-actions github-actions bot added the CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) label Sep 13, 2024
@@ -280,7 +280,7 @@ extra_build_script_src_roots = [ "entities.rs" ]
build_script_outputs = [ "generated.rs", "named_entities.rs", ]

[crate.multihash]
extra_kv = { rustenv = [ "CARGO_MANIFEST_DIR=\" + rebase_path(\"//brave/third_party/rust/chromium_crates_io/vendor/multihash-0.16.3\") + \"" ]}
extra_kv = { rustenv = [ "CARGO_MANIFEST_DIR=\" + rebase_path(\"//brave/third_party/rust/chromium_crates_io/vendor/multihash-0.18.1\") + \"" ]}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we still need this, looks like it's added in run_build_script.py now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this line seems to trigger the following failure

error: `CARGO_MANIFEST_DIR` env variable not set.
  --> ../../brave/third_party/rust/chromium_crates_io/vendor/multihash-0.18.1/src/multihash_impl.rs:11:34
   |
11 |   #[derive(Copy, Clone, Debug, Eq, Multihash, PartialEq)]
   |                                    ^^^^^^^^^ in this derive macro expansion
  --> ./../../brave/third_party/rust/chromium_crates_io/vendor/synstructure-0.12.6/src/macros.rs:94:9
  ::: ./../../brave/third_party/rust/chromium_crates_io/vendor/synstructure-0.12.6/src/macros.rs:96:40
   |
   = note: in this expansion of `#[derive(Multihash)]`

error: aborting due to 1 previous error

I'm not quite sure why run_build_script.py is failing to set CARGO_MANIFEST_DIR for multihash in particular, but this failure seems to be the reason this line has been here in the first place.

@cdesouza-chromium cdesouza-chromium force-pushed the update-multihash-crate branch 4 times, most recently from 509136c to 8f8d866 Compare September 18, 2024 22:25
@cdesouza-chromium cdesouza-chromium force-pushed the update-multihash-crate branch 4 times, most recently from 5eacdc1 to ce22cd8 Compare September 19, 2024 12:35
This change is a first pass in getting the dependecies for
`filecoin-cxx` updated, to eventually be able to drop the unmaintained
crate `proc-macro-error`.

This change updates `multihash` to `v0.16.3`->`v0.18.1`. In a follow up
PR, the goal will be to deploy `v0.19.1`, which drops the unwanted crate
as a transient dependency.
@mkarolin mkarolin merged commit 68fcaaa into master Sep 19, 2024
14 of 17 checks passed
@mkarolin mkarolin deleted the update-multihash-crate branch September 19, 2024 15:19
@github-actions github-actions bot added this to the 1.72.x - Nightly milestone Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit finding: https://rustsec.org/advisories/RUSTSEC-2024-0370
5 participants