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

VCPKG_TRACE_FIND_PACKAGE produces logs although CMAKE_DISABLE_FIND_PACKAGE_ is set #28552

Open
Thomas1664 opened this issue Dec 26, 2022 · 14 comments

Comments

@Thomas1664
Copy link
Contributor

Repro

Using port sdl2:

  • Set -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON and -DVCPKG_TRACE_FIND_PACKAGE=ON in OPTIONS
  • Notice that the configure logs still contain find_package(Git )

Expected behaviour

Don't see find_package(Git ) in the logs.
It would make it easier to see if finding a certain package is actually disabled or not - especially if we would add a post build check for optional calls to find_package.

/cc: @dg0yt Related: #27982

@dg0yt
Copy link
Contributor

dg0yt commented Dec 26, 2022

What is really needed is solving #18631. Ping @ras0219-msft for finishing #18961.

@Thomas1664
Copy link
Contributor Author

What is really needed is solving #18631. Ping @ras0219-msft for finishing #18961.

Is there something missing in this PR? It seems like #18961 can be merged if the conflicts are resolved?

@LilyWangLL LilyWangLL added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Dec 27, 2022
@dg0yt
Copy link
Contributor

dg0yt commented Dec 27, 2022

There is also #27950 which could be extend to log (disabled by CMAKE_DISABLE_FIND_PACKAGE_<Pkg>=1).

@LilyWangLL There is no real bug here IMO. VCPKG_TRACE_FIND_PACKAGE logs something which does take place: a call to find_package(<Pkg>).

@Thomas1664
Copy link
Contributor Author

@LilyWangLL There is no real bug here IMO. VCPKG_TRACE_FIND_PACKAGE logs something which does take place: a call to find_package(<Pkg>).

Technically, you are right but IMO there is no reason to log calls to find_package if CMAKE_DISABLE_FIND_PACKAGE_ is set. Furthermore, there won't be a call to find_package if #18961 gets merged so this will indeed be a bug.

@LilyWangLL LilyWangLL added category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly and removed category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly labels Dec 28, 2022
@LilyWangLL
Copy link
Contributor

@LilyWangLL There is no real bug here IMO. VCPKG_TRACE_FIND_PACKAGE logs something which does take place: a call to find_package(<Pkg>).

Technically, you are right but IMO there is no reason to log calls to find_package if CMAKE_DISABLE_FIND_PACKAGE_ is set. Furthermore, there won't be a call to find_package if #18961 gets merged so this will indeed be a bug.

The job of VCPKG_TRACE_FIND_PACKAGE is printing every call to find_package, If #18961 gets merged, find_package will not be called if CMAKE_DISABLE_FIND_PACKAGE_ is set, so VCPKG_TRACE_FIND_PACKAGE will not print log.
Should I labeled this issue to question?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 28, 2022

There needs to be a decision if these calls shall be
logged as disabled (#28552 (comment))
or not logged at all (#28552 (comment)).

@LilyWangLL
Copy link
Contributor

cc @vicroms

There needs to be a decision if these calls shall be logged as disabled (#28552 (comment)) or not logged at all (#28552 (comment)).

@github-actions
Copy link

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Sep 16, 2023
@Thomas1664
Copy link
Contributor Author

no stale

@github-actions github-actions bot removed the Stale label Sep 19, 2023
Copy link

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Apr 13, 2024
@Thomas1664
Copy link
Contributor Author

no stale

@github-actions github-actions bot removed the Stale label Apr 15, 2024
Copy link

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Oct 27, 2024
@Thomas1664
Copy link
Contributor Author

No stale

@dg0yt
Copy link
Contributor

dg0yt commented Oct 27, 2024

@vicroms This issue waits for a vcpkg team decision. #28552 (comment)

@github-actions github-actions bot removed the Stale label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants