bfgroup / b2

B2 makes it easy to build C++ projects, everywhere.
https://www.bfgroup.xyz/b2/
Boost Software License 1.0
76 stars 228 forks source link

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

Open Flamefire opened 1 year ago

Flamefire commented 1 year ago

Brief problem description

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

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.

grafikrobot commented 9 months ago

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.

pdimov commented 4 months ago

--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.)