Skip to content

Update dependency handlebars to v5 for mdman #13238

@ehuss

Description

@ehuss
Contributor

Problem

Renovate bot found a newer version available for dependency handlebars in #13231. handlebars is used by mdman for templatizing and generating man pages.

However, the new version has some API changes that need to be fixed:

Build failure. Click to See details

error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> crates/mdman/src/hbs.rs:177:9
    |
177 |     d: &Decorator<'_, '_>,
    |         ^^^^^^^^^     -- help: remove this lifetime argument
    |         |
    |         expected 1 lifetime argument
    |
note: struct defined here, with 1 lifetime parameter: `'rc`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/handlebars-5.0.0/src/render.rs:452:12
    |
452 | pub struct Decorator<'rc> {
    |            ^^^^^^^^^ ---

error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> crates/mdman/src/hbs.rs:45:13
    |
45  |         h: &Helper<'reg, 'rc>,
    |             ^^^^^^       --- help: remove this lifetime argument
    |             |
    |             expected 1 lifetime argument
    |
note: struct defined here, with 1 lifetime parameter: `'rc`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/handlebars-5.0.0/src/render.rs:306:12
    |
306 | pub struct Helper<'rc> {
    |            ^^^^^^ ---

error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> crates/mdman/src/hbs.rs:86:13
    |
86  |         h: &Helper<'reg, 'rc>,
    |             ^^^^^^       --- help: remove this lifetime argument
    |             |
    |             expected 1 lifetime argument
    |
note: struct defined here, with 1 lifetime parameter: `'rc`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/handlebars-5.0.0/src/render.rs:306:12
    |
306 | pub struct Helper<'rc> {
    |            ^^^^^^ ---

error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> crates/mdman/src/hbs.rs:144:13
    |
144 |         h: &Helper<'reg, 'rc>,
    |             ^^^^^^       --- help: remove this lifetime argument
    |             |
    |             expected 1 lifetime argument
    |
note: struct defined here, with 1 lifetime parameter: `'rc`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/handlebars-5.0.0/src/render.rs:306:12
    |
306 | pub struct Helper<'rc> {
    |            ^^^^^^ ---

Steps

  1. Clone rust-lang/cargo
  2. Run cargo build-man
  3. Fix the build failure.

Possible Solution(s)

Look into what have been changed in handlebars and update accordingly.

Version

add15366eaf3f3eb84717d3b8b71902ca36a7c84

Activity

added
E-easyExperience: Easy
C-cleanupCategory: cleanup within the codebase
S-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review
A-cli-helpArea: built-in command-line help
P-lowPriority: Low
on Jan 2, 2024
WeiTheShinobi

WeiTheShinobi commented on Jan 3, 2024

@WeiTheShinobi
Contributor

@rustbot claim

added 2 commits that reference this issue on Jan 4, 2024
weihanglo

weihanglo commented on Jan 4, 2024

@weihanglo
Member

Resolved by #13249.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-cli-helpArea: built-in command-line helpC-cleanupCategory: cleanup within the codebaseE-easyExperience: EasyP-lowPriority: LowS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @ehuss@weihanglo@WeiTheShinobi

    Issue actions

      Update dependency `handlebars` to v5 for `mdman` · Issue #13238 · rust-lang/cargo