FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Minor connections refactor by code-asher · Pull Request #3178 · coder/code-server · GitHub

Minor connections refactor - #3178

Merged
code-asher merged 3 commits into
coder:mainfrom
code-asher:connections
Apr 21, 2021
Merged

Minor connections refactor#3178
code-asher merged 3 commits into
coder:mainfrom
code-asher:connections

Conversation

Copy link
Copy Markdown
Member

More details in the commit messages.

code-asher requested a review from a team as a code owner April 20, 2021 22:28

jsjoeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is awesome! Love the code comments too ♥️

P.S. - was this the thing we were discussing where I said I would learn from the code and write a test?

Copy link
Copy Markdown
Member Author

Fixed up the double/single quote errors.

Nope, this is mostly just to set the stage so when it happens again we'll have some better logs to figure out what's going on.

this.logger = logger.named(
this.name,
field("token", this.protocol.options.reconnectionToken),
field('token', this.protocol.options.reconnectionToken),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

what's the difference between " and ' in JavaScript/TypeScript?

code-asher Apr 21, 2021
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

None but VS Code's linting rules enforce ' for "unlocalized" strings (well technically externalized strings) so the only time they are allowed is in calls like:

localize('projectQuickPick.help', "TypeScript help")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ah very interesting pattern, so they're using something that extracts all "-quoted strings into resource bundles?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think they might be doing something like that, although if they can already detect and report to the dev when a string should be using " or ' I'm not sure why they can't just use that knowledge to extract it and don't bother the dev. 😛

jsjoeio added this to the v3.9.4 milestone Apr 21, 2021

jsjoeio commented Apr 21, 2021

Copy link
Copy Markdown
Contributor

Nice work! Merge whenever 🚢

- Move destroy logic into the class itself
- Improve logging a bit
- Remove the record option; we should always do this when using
  permessage-deflate.
- Let debug port be null (it can be null in the message args).
- Add setSocket so we don't have to initiate a connection to set it.
- Move inflate bytes logic into the class itself.
- Moved everything I could into the class itself.
- Improve the logging situation a bit.
- Switch some trace logs to debug.
- Get debug port from message arguments.
zlib errors can cause the protocol handshake to not reject (until the
timeout).
code-asher merged commit b9c80b8 into coder:main Apr 21, 2021
code-asher deleted the connections branch April 21, 2021 17:22
jsjoeio added the chore Related to maintenance or clean up label May 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Related to maintenance or clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL