Skip to content

Conversation

@code-asher
Copy link
Member

More details in the commit messages.

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

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

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

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?

@code-asher
Copy link
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

Choose a reason for hiding this comment

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

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

Copy link
Member Author

@code-asher code-asher Apr 21, 2021

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

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

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 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 jsjoeio added this to the v3.9.4 milestone Apr 21, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Apr 21, 2021

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 code-asher merged commit b9c80b8 into coder:main Apr 21, 2021
@code-asher code-asher deleted the connections branch April 21, 2021 17:22
@jsjoeio jsjoeio added the chore Related to maintenance or clean up label May 14, 2021
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