Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Protocol namespace #134

Merged
merged 3 commits into from
Aug 29, 2018
Merged

Protocol namespace #134

merged 3 commits into from
Aug 29, 2018

Conversation

bmulvihill
Copy link
Contributor

This PR does two things to try and cleanup/organize the code some more.

  • Adds the Protocol namespace, this should make things more clear about what is part of the LSP Protocol
  • Adds protocol.cr and requires that in scry.cr instead of requiring all of the protocol files throughout the program

@bmulvihill bmulvihill self-assigned this Aug 17, 2018
@bmulvihill bmulvihill requested a review from a team August 17, 2018 12:59
JSON.mapping({
id: Int32 | String,
}, true)
module Protocol
Copy link
Contributor

@bew bew Aug 17, 2018

Choose a reason for hiding this comment

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

you can blend the 2 modules to module Scry::Protocol, and avoid adding another indentation inside

Copy link
Contributor Author

@bmulvihill bmulvihill Aug 17, 2018

Choose a reason for hiding this comment

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

I guess thats personal preference. I always prefer to keep module declarations separate, maybe its from my Ruby background where it was always advised to do it this way to avoid the situation where a module wasn't defined prior to writing the Path.

@bmulvihill
Copy link
Contributor Author

@bew on second thought I like that approach better. This isn't Ruby after all :)

@bmulvihill
Copy link
Contributor Author

@bew any additional input regarding the namespace?

void_params = VoidParams.from_json("{}")
void_params.is_a?(VoidParams).should be_true
end
module Protocol
Copy link
Contributor

Choose a reason for hiding this comment

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

You can merge to Scry::Protocol here as well

@bew
Copy link
Contributor

bew commented Aug 23, 2018

Not sure why the build failed on osx: https://travis-ci.org/crystal-lang-tools/scry/jobs/417374390

@bmulvihill
Copy link
Contributor Author

@bew need to rebase this and pull in the 0.26.0 changes

Copy link
Contributor

@bew bew left a comment

Choose a reason for hiding this comment

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

Looks good!

@bew bew merged commit a114a06 into master Aug 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants