Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. meson: Differentiate top-level and custom targets

  1. meson html:alias vs. html:custom

    Peter Eisentraut <peter@eisentraut.org> — 2026-04-14T08:08:22Z

    When I run
    
    meson compile -C build html
    
    I get this error message:
    
    INFO: autodetecting backend as ninja
    
    ERROR: Can't invoke target `html`: ambiguous name. Add target type 
    and/or path:
    - ./doc/src/sgml/html:custom
    - ./doc/src/sgml/html:alias
    
    If I follow that advice and run meson compile -C build html:alias or 
    html:custom, then it works.
    
    The setup in doc/src/sgml/meson.build is
    
    html = custom_target('html', ...)
    
    alias_target('html', html)
    
    If I remove the alias_target, then my original command works.  What is 
    the purpose of this alias?
    
    (The equivalent problem exists for "man".)
    
    
    
    
    
  2. Re: meson html:alias vs. html:custom

    Nazir Bilal Yavuz <byavuz81@gmail.com> — 2026-04-14T13:24:04Z

    Hi,
    
    On Tue, 14 Apr 2026 at 11:08, Peter Eisentraut <peter@eisentraut.org> wrote:
    >
    > If I remove the alias_target, then my original command works.  What is
    > the purpose of this alias?
    
    I think the main purpose was using these targets with the ninja
    command like: 'ninja ${target}'. ninja command doesn't work when the
    alias_target() is removed.
    
    
    -- 
    Regards,
    Nazir Bilal Yavuz
    Microsoft
    
    
    
    
  3. Re: meson html:alias vs. html:custom

    Álvaro Herrera <alvherre@kurilemu.de> — 2026-04-16T06:26:06Z

    On 2026-04-14, Nazir Bilal Yavuz wrote:
    
    > On Tue, 14 Apr 2026 at 11:08, Peter Eisentraut <peter@eisentraut.org> wrote:
    >>
    >> If I remove the alias_target, then my original command works.  What is
    >> the purpose of this alias?
    >
    > I think the main purpose was using these targets with the ninja
    > command like: 'ninja ${target}'. ninja command doesn't work when the
    > alias_target() is removed.
    
    I think this is kinda silly. I would rather rename the meson target (to, say, do_html) and make the alias reference that, so that both "meson compile html" and "ninja html" would use the alias.
    
    -- 
    Álvaro Herrera
    
    
    
    
  4. Re: meson html:alias vs. html:custom

    Nazir Bilal Yavuz <byavuz81@gmail.com> — 2026-04-16T07:46:07Z

    Hi,
    
    On Thu, 16 Apr 2026 at 09:26, Álvaro Herrera <alvherre@kurilemu.de> wrote:
    >
    > On 2026-04-14, Nazir Bilal Yavuz wrote:
    >
    > > On Tue, 14 Apr 2026 at 11:08, Peter Eisentraut <peter@eisentraut.org> wrote:
    > >>
    > >> If I remove the alias_target, then my original command works.  What is
    > >> the purpose of this alias?
    > >
    > > I think the main purpose was using these targets with the ninja
    > > command like: 'ninja ${target}'. ninja command doesn't work when the
    > > alias_target() is removed.
    >
    > I think this is kinda silly. I would rather rename the meson target (to, say, do_html) and make the alias reference that, so that both "meson compile html" and "ninja html" would use the alias.
    
    I agree with you. Here is a patch for fixing this problem with your
    suggestion. I added the '-custom' suffix instead of the 'do_' prefix,
    I think this makes it more concrete.
    
    
    -- 
    Regards,
    Nazir Bilal Yavuz
    Microsoft
    
  5. Re: meson html:alias vs. html:custom

    Peter Eisentraut <peter@eisentraut.org> — 2026-04-24T07:52:34Z

    On 16.04.26 09:46, Nazir Bilal Yavuz wrote:
    > Hi,
    > 
    > On Thu, 16 Apr 2026 at 09:26, Álvaro Herrera <alvherre@kurilemu.de> wrote:
    >>
    >> On 2026-04-14, Nazir Bilal Yavuz wrote:
    >>
    >>> On Tue, 14 Apr 2026 at 11:08, Peter Eisentraut <peter@eisentraut.org> wrote:
    >>>>
    >>>> If I remove the alias_target, then my original command works.  What is
    >>>> the purpose of this alias?
    >>>
    >>> I think the main purpose was using these targets with the ninja
    >>> command like: 'ninja ${target}'. ninja command doesn't work when the
    >>> alias_target() is removed.
    >>
    >> I think this is kinda silly. I would rather rename the meson target (to, say, do_html) and make the alias reference that, so that both "meson compile html" and "ninja html" would use the alias.
    > 
    > I agree with you. Here is a patch for fixing this problem with your
    > suggestion. I added the '-custom' suffix instead of the 'do_' prefix,
    > I think this makes it more concrete.
    
    Committed, thanks.