[rb-general] BUILD_PATH_PREFIX_MAP code examples and test cases

Ian Jackson ijackson at chiark.greenend.org.uk
Wed Feb 22 22:50:07 CET 2017


Ximin Luo writes ("Re: [rb-general] BUILD_PATH_PREFIX_MAP code examples and test cases"):
> A draft spec is here:
> 
> https://github.com/infinity0/rb-prefix-map/blob/master/spec-draft.rst

Thanks.  I reviewed this.

I am surprised at your choice of ordering of the key/value pairs.  I
would expect that most producers will have in their head a list like
   FOO_BUILDDIR=/path/to/foo
   BAR_BUILDDIR=/path/to/bar
   TMP_AREA=/path/to/our/tmp

Your ordering means that such a producer must make a map specifying
   /path/to/foo=FOO_BUILDDIR
   /path/to/bar=BAR_BUILDDIR
   /path/to/our/tmp=TMP_AREA

This seems unnaturla.

Or to put it another way: normally, the actual paths will vary, and
the replacement tokens will be fixed.  = normally has the more-fixed
thing on the left.

So I think you should swap the order of the pairs.

Otherwise (and modulo choice of %-characters) it LGTM.

Thanks,
Ian.


More information about the rb-general mailing list