xmake-io / xrepo

🗂️ A cross-platform C/C++ package manager based on Xmake
https://xrepo.xmake.io
Apache License 2.0
354 stars 18 forks source link

Odd characters in output from xrepo #5

Closed SeanRamey closed 3 years ago

SeanRamey commented 3 years ago

Describe the bug

Small typo looking issue in the xrepo output. Only happens when add_requires() is a certain order. This produces the bug:

add_requires("libsdl","libpng", "glib", "freetype", "brotli", {system = false})

Here's the output:

xmake
checking for platform ... linux
checking for architecture ... x86_64
note: try installing these packages (pass -y to skip confirm)?
in xmake-repo:
  -> freetype 2.10.4 
  -> brotli#1 1.0.9  <----  See here, the extra '#1' after 'brotli'
please input: y (y/n)

This does not:

add_requires("brotli", {system = false})
add_requires("libsdl","libpng", "glib", "freetype", {system = false})

Here's the output:

xmake
checking for platform ... linux
checking for architecture ... x86_64
note: try installing these packages (pass -y to skip confirm)?
in xmake-repo:
  -> brotli 1.0.9 
please input: y (y/n)

Expected behavior

Shouldn't have extra characters.

Related Environment

waruqi commented 3 years ago

Because there are two brolti packages with different configs in your xmake.lua, xmake will use #id to distinguish them, root brolti (add_requires(brolti)) and freetype's dep(brolti)

you need only remove add_requires(brolti)

SeanRamey commented 3 years ago

Because there are two brolti packages with different configs in your xmake.lua, xmake will use #id to distinguish them, root brolti (add_requires(brolti)) and freetype's dep(brolti)

you need only remove add_requires(brolti)

If that's true, why does it matter if I move brotli to a seperate add_requires()?

waruqi commented 3 years ago

If that's true, why does it matter if I move brotli to a seperate add_requires()?

You can add it, but freetype will still use the brolti package that it depends on internally.

waruqi commented 3 years ago

It is not a bug.