b2 icon indicating copy to clipboard operation
b2 copied to clipboard

`--abbreviate-paths` leads to build config clashes

Open Flamefire opened this issue 2 years ago • 2 comments

Brief problem description

I was using something like <relevant>boost.locale.std <relevant>boost.locale.icu together with --abbreviate-paths and noticed failures as

  • ./b2 --abbreviate-paths boost.locale.std=off
  • ./b2 --abbreviate-paths boost.locale.icu=off

created the same folders "bst.l-off" leading to skipped rebuilds where different defines would have been required.

Expected behavior summary

The abbreviated paths of relevant features should be unique.

Flamefire avatar Jun 29 '23 19:06 Flamefire

The path shortening that --abbreviated-paths does is both very limited. And, yes, will generate duplicates for features that have share a common, not short prefix. I could try and make it more clever. But it would never guarantee uniqueness. If you need virtually guaranteed shorter paths there's the --hash option.

grafikrobot avatar Dec 14 '23 04:12 grafikrobot

--abbreviate-paths should probably split on both '.' and '-' in order to handle this case. (It's common for library-local features to have such composite names separated with dots instead of hyphens.)

pdimov avatar May 01 '24 00:05 pdimov