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

[READY] Print a message equivalent to that printed by waitress.serve #555

Merged
merged 1 commit into from Jul 23, 2016

Conversation

puremourning
Copy link
Member

@puremourning puremourning commented Jul 23, 2016

#282 breaks emacs-ycmd as it parses the standard output to get the port that ycmd is listening on.

While it probably makes sense for emacs-ycmd to specify the port, this is a regression so we re-introduce the output equivalent to waitress.serve


This change is Reviewable

@puremourning
Copy link
Member Author

cc @ptrv

@vheon
Copy link
Contributor

vheon commented Jul 23, 2016

:lgtm:


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


Comments from Reviewable

@micbou
Copy link
Collaborator

micbou commented Jul 23, 2016

I was wondering why this message was not appearing anymore but didn't look further. I should have.


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


ycmd/main.py, line 188 [r1] (raw file):

  print( 'serving on http://{0}:{1}'.format(
    handlers.wsgi_server.effective_host,
    handlers.wsgi_server.effective_port ) )

I would move this to the StoppableWSGIServer class because it depends on waitress internals.


Comments from Reviewable

@codecov-io
Copy link

codecov-io commented Jul 23, 2016

Current coverage is 92.69% (diff: 100%)

Merging #555 into master will increase coverage by <.01%

@@             master       #555   diff @@
==========================================
  Files            41         41          
  Lines          3778       3779     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           3502       3503     +1   
  Misses          276        276          
  Partials          0          0          

Powered by Codecov. Last update 8b2f78a...cd7577d

@ptrv
Copy link
Contributor

ptrv commented Jul 23, 2016

Thanks for bringing back the old behavior. We probably need to change the way emacs-ycmd starts the server and how it checks for the port (probably specifying the port when starting the server) but that would need more effort to change compared to just adapt the new shutdown process.

Thanks again for your work!

@puremourning
Copy link
Member Author

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


ycmd/main.py, line 188 [r1] (raw file):

Previously, micbou wrote…

I would move this to the StoppableWSGIServer class because it depends on waitress internals.

Done.

You're quite right.


Comments from Reviewable

@micbou
Copy link
Collaborator

micbou commented Jul 23, 2016

:lgtm:

@homu r+


Reviewed 2 of 2 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@homu
Copy link
Contributor

homu commented Jul 23, 2016

📌 Commit ea9c80c has been approved by micbou

homu added a commit that referenced this pull request Jul 23, 2016
[READY] Print a message equivalent to that printed by waitress.serve

#282 breaks emacs-ycmd as it parses the standard output to get the port that ycmd is listening on.

While it probably makes sense for emacs-ycmd to specify the port, this is a regression so we re-introduce the output equivalent to [`waitress.serve`](https://github.com/Pylons/waitress/blob/3850e4c09aa9a55dc5c61985981b4ef719d5ebb8/waitress/__init__.py#L13-L14)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/555)
<!-- Reviewable:end -->
@homu
Copy link
Contributor

homu commented Jul 23, 2016

⌛ Testing commit ea9c80c with merge 2daaa5b...

@homu
Copy link
Contributor

homu commented Jul 23, 2016

☀️ Test successful - status

@homu homu merged commit ea9c80c into ycm-core:master Jul 23, 2016
@puremourning puremourning deleted the waitress-print branch November 1, 2016 20:43
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.

None yet

6 participants