Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

private should not duplicate package installation #4934

Open
SirLynix opened this issue Apr 4, 2024 · 1 comment
Open

private should not duplicate package installation #4934

SirLynix opened this issue Apr 4, 2024 · 1 comment
Labels

Comments

@SirLynix
Copy link
Member

SirLynix commented Apr 4, 2024

Xmake Version

2.8.9

Operating System Version and Architecture

Windows 11

Describe Bug

When two packages have the same dependencies, but one of them mark it as private, the package is installed twice.

$ xmake f
checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> fast_double_parser v0.7.0 [private, from:foo]
  -> fast_double_parser#1 v0.7.0 [from:bar]
  -> foo latest [runtimes:"MT"]
  -> bar latest [runtimes:"MT"]
please input: y (y/n/m)

Expected Behavior

the private dependency should get installed once

$ xmake f
checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> fast_double_parser v0.7.0 [from:foo, bar]
  -> foo latest [runtimes:"MT"]
  -> bar latest [runtimes:"MT"]
please input: y (y/n/m)

Project Configuration

package("foo")
    add_deps("fast_double_parser", { private = true })
    on_install(function() end)
package_end()

package("bar")
    add_deps("fast_double_parser")
    on_install(function() end)
package_end()

add_rules("mode.debug", "mode.release")

add_requires("foo", "bar")

target("test_private")
    set_kind("binary")
    add_files("src/*.cpp")

Additional Information and Error Logs

It doesn't seem the culprit is the config hash here

@SirLynix SirLynix added the bug label Apr 4, 2024
@waruqi
Copy link
Member

waruqi commented Apr 7, 2024

This is to fix a previous issue, but I forget which one b95ee9d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants