Skip to content

Replace use of debug! by warn! in constellation.rs - #10489

Merged
bors-servo merged 1 commit into
servo:masterfrom
timvandermeij:constellation-debug-warn
Apr 13, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
timvandermeij:constellation-debug-warn

Conversation

@timvandermeij

Copy link
Copy Markdown
Contributor

Fixes #10483.


This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 8, 2016
@emilio

emilio commented Apr 8, 2016

Copy link
Copy Markdown
Member

Hum... Probably we don't want to replace all those, there are some of them which are just debug info, like the "constellation got xxx message" ones.

In case we want those in release mode by default (I'm not totally sure about that), at least they should be changed to info!() instead of warn!().

Thoughts, @jdm and @asajeffrey? (or anyone else, just mentioning them because they were participating in the corresponding issue).

@timvandermeij

Copy link
Copy Markdown
Contributor Author

Good point, thank you! I was thinking about that myself for some time too, but I didn't know info!() existed for debug messages. I can certainly update the patch to use info!() for debug messages and warn!() for actual warnings (indicating failure or other unexpected results), but before I do I'd like to know if you would still like to keep those debug messages around in the code if they are not suitable for release builds. If not, we can either remove them or somehow only show them in debug builds. I'm not entirely sure how to achieve the latter option, so any tips for that would be appreciated. I'll change it to whatever you think is best!

@emilio

emilio commented Apr 8, 2016

Copy link
Copy Markdown
Member

To only compile them in debug builds you should keep them using debug!() (you need to use RUST_LOG=debug to see them though, since it can be quite verbose).

Anyways, appart from that this looks great! Thanks! :)

Let's wait for more servo people to hear their opinions before changing back and forth :P

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 11, 2016
@jdm

jdm commented Apr 11, 2016

Copy link
Copy Markdown
Member

I don't think we need to think about debug vs. info at this point. Let's just go ahead and revert the changes to messages that aren't actually conditions that should be treated as warnings.
-S-awaiting-review +S-needs-code-changes


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


components/compositing/constellation.rs, line 573 [r1] (raw file):
Sorry, most of the messages in this function should stay as debug!, since they're perfectly normal program execution conditions. Generally, if the message mentions an error condition or a dead/closed pipeline, it should be a warning. If not, debug is fine.


components/compositing/constellation.rs, line 1106 [r1] (raw file):
This can stay debug.


components/compositing/constellation.rs, line 1122 [r1] (raw file):
This can stay debug.


components/compositing/constellation.rs, line 1478 [r1] (raw file):
This can be debug.


components/compositing/constellation.rs, line 1528 [r1] (raw file):
Debug.


Comments from Reviewable

@asajeffrey

Copy link
Copy Markdown
Contributor

No huge surprise here, I agree with @jdm, it's just the unexpected cases that should be warn!, most messages should stay debug!. Sorry about that, I should have been clearer in #10483.

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #10224) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Apr 12, 2016
@timvandermeij

Copy link
Copy Markdown
Contributor Author

I went over all debug! uses again and only changed the ones to warn that mentioned an error condition or a dead/closed pipeline. Could you check again if all is fine now and if nothing else should be debug! anymore? For instance, I'm not entirely sure about https://github.com/servo/servo/pull/10489/files#diff-1a53afd6ead42d467f2f136dc552127bR657. It mentions handling a failure, but you might also consider that to be a debug print if the error itself it already handled elsewhere.

@jdm

jdm commented Apr 13, 2016

Copy link
Copy Markdown
Member

Looks good! Just that one remaining one that you pointed out.
-S-needs-rebase -S-awaiting-review +S-needs-code-changes


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/compositing/constellation.rs, line 657 [r2] (raw file):
This can be debug! too.


Comments from Reviewable

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Apr 13, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Apr 13, 2016
@timvandermeij

Copy link
Copy Markdown
Contributor Author

@jdm

jdm commented Apr 13, 2016

Copy link
Copy Markdown
Member

@bors-servo: r+
Thanks!


Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 29e564b has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 13, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 29e564b with merge 628c549...

bors-servo pushed a commit that referenced this pull request Apr 13, 2016
Replace use of `debug!` by `warn!` in `constellation.rs`

Fixes #10483.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10489)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 29e564b into servo:master Apr 13, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 13, 2016
@timvandermeij
timvandermeij deleted the constellation-debug-warn branch April 13, 2016 22:02
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.

6 participants