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

making aggregate_components non-destructive, very dangerous #10183

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Dec 15, 2021

Changelog: Bugfix: Making aggregate_components non-destructive, which was causing errors in generators with components.
Docs: Omit

Fix: #10176

I have removed the requirement to do a copy() before an aggregate_components() because forgetting to do that was causing a super-challenging to debug and understand behavior. Now aggregated_components() return a copy (cached) of the aggregated information, but never destroys the current one. Take into account that users building their own generate() logic or their own generators will very often need to aggregate the components information (for example MSBuildDeps and AutoToolsDeps already need to do it), and missing to do the copy() results in this very problematic bug.

Fix: #10176

@memsharded memsharded marked this pull request as ready for review December 15, 2021 23:51


def test_cpp_info_component_error_aggregate():
# https://github.com/conan-io/conan/issues/10176
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking the issue and describing the test is very nice, but, when the assert is only kind of "this is working" would be great to describe here why exactly "consumer/1.0 (test package): Running test()" was not in the output before the fix without reading the whole issue thread.

@lasote lasote merged commit 26b2dbc into conan-io:release/1.43 Dec 17, 2021
@franramirez688 franramirez688 linked an issue Dec 17, 2021 that may be closed by this pull request
@memsharded memsharded deleted the hotfix/aggregate_components_destructive branch December 17, 2021 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] CMakeDeps sometimes fails for test package
4 participants