Skip to content

[depend-info] Turn errors into warnings when querying dependencies of unsupported triplet#300

Merged
strega-nil-ms merged 3 commits intomicrosoft:mainfrom
JackBoosY:dev/jack/allow-unsupport
Dec 15, 2021
Merged

[depend-info] Turn errors into warnings when querying dependencies of unsupported triplet#300
strega-nil-ms merged 3 commits intomicrosoft:mainfrom
JackBoosY:dev/jack/allow-unsupport

Conversation

@JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Dec 13, 2021

In PR #184, we terminate the command early according to the supports field in CONTROL/vcpkg.json, which affects the command depend-info, and it does not support the parameter --allow-unsupported.

Now these error messages are always treated as warnings.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

+1 -- I would go even farther and just make this the default. depend-info is not a system-mutating operation and does not take appreciable time so blocking the unsupported entries isn't really useful.

@Neumann-A
Copy link
Contributor

appreciable time so blocking the unsupported entries isn't really useful.

unless you want to know why something in CI is skipped.

@BillyONeal
Copy link
Member

appreciable time so blocking the unsupported entries isn't really useful.

unless you want to know why something in CI is skipped.

We should still be printing the warning, we just shouldn't block other depend-info data when the warning happens.

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Dec 14, 2021

@BillyONeal Sadly, if we always set it to Dependencies::UnsupportedPortAction::Warn and discard --allow-unsupported, these warnings will never be printed:

m_warnings.push_back("Warning: " + msg);

So I modifed this line to:

print2(Color::warning, msg + "\n");

But I don't know if it will affect the follow-up process.

@autoantwort
Copy link
Contributor

m_warnings.push_back("Warning: " + msg);

So I modifed this line to:

print2(Color::warning, msg + "\n");

Don't do that. Do it like here and print the warnings that were returned by create_feature_install_plan

@JackBoosY JackBoosY changed the title [depend-info] Support option --allow-unsupported [depend-info] Turn errors into warnings when querying dependencies of unsupported triplet Dec 14, 2021
@JackBoosY
Copy link
Contributor Author

@BillyONeal Can we merge this now?

@strega-nil-ms strega-nil-ms merged commit 132714c into microsoft:main Dec 15, 2021
@JackBoosY JackBoosY deleted the dev/jack/allow-unsupport branch December 16, 2021 02:48
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.

5 participants