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

chore(*): Upgrade to hyper-0.14.x #459

Merged
merged 48 commits into from
Feb 21, 2021
Merged

Conversation

jolhoeft
Copy link
Member

@jolhoeft jolhoeft commented Aug 24, 2020

At long last, we have an async version. This PR builds, and all but one example program works and have been tested (except the long broken https example). This is complete enough that the remaining work can be broken into more manageable pieces. There are some limitations:

  • cargo test fails horribly. This PR is already large, and the integration tests require rewriting the test harness, so I plan on fixing the tests in the next PR. I could be persuaded otherwise though.

The following are all for a future PR.

  • async functions don't yet have a default Middleware implementation. This should be mostly a case of figuring out the correct type signature.
  • middleware and router macros do not support async. This is more complex to fix. We may want to combine this with a redesign of the middleware macro, which has confusing behavior. This is why the macro_example program is disabled.

These two items mean the only way to write an async middleware is to implement the Middleware trait. A number of the example programs demonstrate how to do this.

  • plugins are disabled due to the plugin crate not not being able to be restricted to Sync + Send. The plugin crate may be abandoned, so fixing this may be a headache.

  • Response::on_send is currently disabled. Feedback on its use cases is needed, in particular does it need to be async, which is more complex.

@GitCop
Copy link

GitCop commented Aug 24, 2020

Thanks for contributing! Unfortunately, I'm here to tell you there were style issues with your Pull Request:

  • Commit: 148f113

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 7f01f95

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 4cd09cc

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 264cd23

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 362e477

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 8a828ac

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 8293706

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ea3d8f1

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 8ff8981

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: df8b94f

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ad183a6

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 6896d75

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 63a7723

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 4cb386a

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 84038c4

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ee96b9f

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 399da65

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 52ec773

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 51c1f51

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 72409b2

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: e13cfe6

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 4bd3544

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: fe20927

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: e90ed6f

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 5a7524d

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 75daf1b

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Invalid type. Valid types are feat, fix, docs, style, refactor, perf, test, chore, revert, doc

  • Commit: 6495879

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ee8b813

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: c00e64c

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 3c91d38

  • Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/nickel-org/nickel.rs/blob/master/contributing.md


This message was auto-generated by https://gitcop.com

@jolhoeft jolhoeft changed the title Upgrade to hyper-0.13.x chore(*): Upgrade to hyper-0.13.x Aug 24, 2020
Copy link

@therealbstern therealbstern left a comment

Choose a reason for hiding this comment

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

The only trouble spots I see, from most meaningful to least, are:

  • there's a lot of TODO for this refactor still present
    • it's not clear that they're all addressed
  • the loss of plugins is concerning
    • I'm especially concerned about multipart
    • I don't see cookies/nickel-cookies as a builtin either
  • there's some redundant interfaces that should be dropped (body_parser, for example)
  • listener.socket() appears gone, and this is a mildly interesting method to keep
  • origin has become pub which is probably fine but will be conceptually hard to make private again later if need be
  • SSL support is moved into hyper or otherwise gone?
  • various startup/shutdown interface stuff
    • output_on_listen tested and used in some places where it's not actually making anything clearer
    • output_on_listen not being used in some places where the listen socket is printed
    • end is now a no-op

Overall, it looks good to me, though this would benefit from another pass to remove dead code and improve idioms.

Finally, I'm glad to see the 'mw lifetime go away but it's not obvious to me why <D: '_, '_> is used. Is this inherited from hyper changes?

examples/integration_testing.rs Show resolved Hide resolved
examples/json.rs Show resolved Hide resolved
examples/no_macro_response_custom_data.rs Show resolved Hide resolved
src/body_parser.rs Outdated Show resolved Hide resolved
src/extensions/response.rs Show resolved Hide resolved
src/response.rs Show resolved Hide resolved
src/response.rs Show resolved Hide resolved
src/server.rs Show resolved Hide resolved
src/server.rs Show resolved Hide resolved
src/server.rs Show resolved Hide resolved
@GitCop
Copy link

GitCop commented Feb 20, 2021

Thanks for contributing! Unfortunately, I'm here to tell you there were style issues with your Pull Request:

  • Commit: 148f113

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 7f01f95

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 4cd09cc

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 264cd23

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 362e477

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 8a828ac

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 8293706

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ea3d8f1

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 8ff8981

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: df8b94f

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ad183a6

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 6896d75

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 63a7723

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 4cb386a

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 84038c4

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ee96b9f

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 399da65

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 52ec773

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 51c1f51

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 72409b2

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: e13cfe6

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 4bd3544

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: fe20927

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: e90ed6f

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 5a7524d

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 75daf1b

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Invalid type. Valid types are feat, fix, docs, style, refactor, perf, test, chore, revert, doc

  • Commit: 6495879

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: ee8b813

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: c00e64c

  • Commits must be in the following format: %{type}(%{scope}): %{description}

  • Commit: 3c91d38

  • Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/nickel-org/nickel.rs/blob/master/contributing.md


This message was auto-generated by https://gitcop.com

@jolhoeft jolhoeft changed the title chore(*): Upgrade to hyper-0.13.x chore(*): Upgrade to hyper-0.14.x Feb 20, 2021
@jolhoeft jolhoeft merged commit 7d12245 into nickel-org:master Feb 21, 2021
This was referenced Feb 21, 2021
@cburgdorf
Copy link
Member

Thank you so much for your continued support 🙏♥️

@jolhoeft
Copy link
Member Author

You're welcome. A lot to be done before a 0.12 can release, though.

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.

4 participants