Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Fixed build warnings in src/Nancy #2667

Merged
merged 1 commit into from
Dec 30, 2016

Conversation

thecodejunkie
Copy link
Member

@thecodejunkie thecodejunkie commented Dec 26, 2016

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the Nancy code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

Fixed build warnings. The following was changed

  • Fixed invalid XML comments
  • Added missing XML comments
  • Added a couple of missing this.
  • Changes a couple of String to string
  • Wrapped a single line if-statement in curly-braces

The one code change that went in was in DiagnosticsHook where we don't really do async handling and we were calling on a method that returns Task. I've changed that to Wait() on the task

@thecodejunkie
Copy link
Member Author

👀 @NancyFx/most-valued-minions

@@ -188,7 +188,7 @@ private static Response ExecuteDiagnostics(NancyContext ctx, IRouteResolver rout

if (resolveResult.After != null)
{
resolveResult.After.Invoke(ctx, CancellationToken);
resolveResult.After.Invoke(ctx, CancellationToken).Wait();
Copy link
Member

Choose a reason for hiding this comment

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

This isn't good 😢

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I know and I had a chat with @damianh about it.. the real alternative would be to convert the diagnostics stuff completely to async as well I guess?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we must not forget that we have a pretty half-assed async story right now. I think we really need to look at getting everything async soon -- before we release 2.0.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah just gave a nudge at #2577

Copy link
Member Author

Choose a reason for hiding this comment

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

I can revert the Wait() so we can get the other stuff in?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, let's tackle everything when we're ready for it 😝

Copy link
Member

Choose a reason for hiding this comment

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

This is one of those changes that will have a knock on effect and will explode this PR. I would agree to merge this PR as is and fix this .Wait() in a subsequent PR.

@thecodejunkie
Copy link
Member Author

@khellang @damianh reverted the Wait()

@thecodejunkie
Copy link
Member Author

We're actually going a Wait() on line 179 (added by me apparently, during the new route syntax stuff). Should I nuke that as well?

@khellang
Copy link
Member

Yeah, just nuke it while you're there 😄

@khellang
Copy link
Member

Argh. The damn Should_return_JSON_serialized_form test is failing on Travis again. Or did we never get to fix it?

@thecodejunkie
Copy link
Member Author

@khellang removed the second Wait(). We resolved Should_return_JSON_serialized_form by upgrading the used Mono version on Travis =/

@khellang khellang merged commit c2aef9c into NancyFx:master Dec 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants