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

Add core:warnings_as_errors configuration option #15149

Merged
merged 9 commits into from
Dec 18, 2023

Conversation

AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Nov 21, 2023

Changelog: Feature: Add core:warnings_as_errors configuration option to make Conan raise on warnings and errors.
Docs: conan-io/docs#3484

First try for core:warnings_as_errors. It worries me that people might want to have Conan stop processing on errors in this case (We mostly do that now when we print proper errors as they are next to raised exceptions), but I'm not quite sure if I should just raise here too. Any opinions are welcomed :)

Closes #14909

@AbrilRBS AbrilRBS requested a review from memsharded November 21, 2023 15:21
@AbrilRBS AbrilRBS added this to the 2.0.15 milestone Nov 21, 2023
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I was kind of expecting to raise an exception to produce a hard error, otherwise, it is just move error messages from yellow to read and WARN=>ERROR; but still can be skipped? And if we need to check for output, we can directly check the warnings.

conan/internal/conan_app.py Outdated Show resolved Hide resolved
conan/api/output.py Outdated Show resolved Hide resolved
@AbrilRBS AbrilRBS modified the milestones: 2.0.15, 2.0.16, 2.1 Dec 14, 2023
@AbrilRBS AbrilRBS marked this pull request as ready for review December 17, 2023 20:25
@AbrilRBS AbrilRBS modified the milestones: 2.1, 2.0.15 Dec 18, 2023
conan/internal/api/detect_api.py Outdated Show resolved Hide resolved
conan/internal/api/detect_api.py Outdated Show resolved Hide resolved
conan/internal/cache/db/cache_database.py Outdated Show resolved Hide resolved
@@ -77,7 +77,7 @@ def _deploy_single(dep, conanfile, output_folder, folder_name):
except Exception as e:
if "WinError 1314" in str(e):
ConanOutput().error("full_deploy: Symlinks in Windows require admin privileges "
"or 'Developer mode = ON'")
"or 'Developer mode = ON'", error_type="context")
Copy link
Member

Choose a reason for hiding this comment

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

What is a "context" error? The meaning is not evident to me

@AbrilRBS AbrilRBS force-pushed the rr/warnings-as-errors branch from 4bff9ee to 974b568 Compare December 18, 2023 10:43
@memsharded memsharded merged commit 97b8b6d into conan-io:release/2.0 Dec 18, 2023
2 checks passed
@AbrilRBS AbrilRBS deleted the rr/warnings-as-errors branch December 19, 2023 01:13
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.

[feature] Add "warnings as errors" mode
3 participants