Skip to content

Full vs. relative paths and ninja #2283

@alecazam

Description

@alecazam

Seems like there should be someway to correlate cononcial relative paths for readability with full paths for the actual build. Xcode for example, doesn't support clickthrough to issues unless a full path is written out for errors/warnings.

Could it be possible to tie modstamp comparisons and progress logs to the shorter path, but request the full path with something like the following? If the calling script has already done a pushd to the directory, then the shorter paths are much simpler to read, but I need the full path for output of warnings/errors.

Here's what I have now which is pretty ugly syntax

rule genMSL
    command = $hlslparser $flagsParser -i $in -o $out

build ${dstDir}Skinning.metal: genMSL ${srcDir}Skinning.hlsl | ${dependsMSL}

vs. what I want

rule genMSL
    command = $hlslparser $flagsParser -i fullpath($in) -o fullpath($out)

build Skinning.metal : genMSL ../src/Skinning.hlsl |  ${dependsMSL}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions