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

[1.0] Fix Workspace Symbol Provider #269

Closed
glennsarti opened this issue Jul 11, 2020 · 2 comments · Fixed by #271
Closed

[1.0] Fix Workspace Symbol Provider #269

glennsarti opened this issue Jul 11, 2020 · 2 comments · Fixed by #271
Labels
bug Something isn't working
Milestone

Comments

@glennsarti
Copy link
Contributor

Looks like the document symbol provider may need some work.

**"jsonrpc":"2.0","id":29,"method":"workspace/symbol","params":{"query":""}}
---
W, [2020-07-11T20:31:57.838792 #7976]  WARN -- : [Manifest::DocumentSymbolProvider] Unknown object type PuppetLanguageServer::Sidecar::Protocol::PuppetDataType
W, [2020-07-11T20:31:57.839161 #7976]  WARN -- : [Manifest::DocumentSymbolProvider] Unknown object type PuppetLanguageServer::Sidecar::Protocol::PuppetDataType
W, [2020-07-11T20:31:57.839468 #7976]  WARN -- : [Manifest::DocumentSymbolProvider] Unknown object type PuppetLanguageServer::Sidecar::Protocol::PuppetDataType
W, [2020-07-11T20:31:57.839725 #7976]  WARN -- : [Manifest::DocumentSymbolProvider] Unknown object type PuppetLanguageServer::Sidecar::Protocol::PuppetDataType
W, [2020-07-11T20:31:57.840034 #7976]  WARN -- : [Manifest::DocumentSymbolProvider] Unknown object type PuppetLanguageServer::Sidecar::Protocol::PuppetDataType
W, [2020-07-11T20:31:57.840303 #7976]  WARN -- : [Manifest::DocumentSymbolProvider] Unknown object type PuppetLanguageServer::Sidecar::Protocol::PuppetDataType
E, [2020-07-11T20:31:57.841884 #7976] ERROR -- : (workspace/symbol) undefined method `start_with?' for nil:NilClass
D, [2020-07-11T20:31:57.842149 #7976] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":29,"result":[]}
@glennsarti glennsarti added the bug Something isn't working label Jul 11, 2020
@glennsarti glennsarti added this to the 1.0.0 milestone Jul 11, 2020
@glennsarti
Copy link
Contributor Author

Found it (and a few other bugs too)

Some items in the object cache have nil as their file source (e.g. Bolt static data) which then blows up the build_file_uri helper

@glennsarti
Copy link
Contributor Author

Making some nice work on this. Bunch more bug fixes I found.

glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Output DataTypes
Ignore Facts
Fix comments
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the workspace detection would use the RootURI even if it was nil.
This commit changes the detection to see if the RootURI key exists AND the value
is not nil.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously if nil was passed into the build_file_uri method it would raise an
obtuse error. This commit instead returns nil of the path is nil, otherwise
it attempts to build a URI for the path.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the Workspace Symbol Provider was not outputting DataTypes and was
unnecessarily output debuging information for Facts.  This commit adds support
for DataTypes and ignores Facts.  This commit also updates typos in the code
comments.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the workspace detection would use the RootURI even if it was nil.
This commit changes the detection to see if the RootURI key exists AND the value
is not nil.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously if nil was passed into the build_file_uri method it would raise an
obtuse error. This commit instead returns nil of the path is nil, otherwise
it attempts to build a URI for the path.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the Workspace Symbols request was not tested as part of the
acceptance suite.  This commit adds a Workspace symbols request test and
refactors the mock editor client to make it easier to be consumed during
development.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously if nil was passed into the build_file_uri method it would raise an
obtuse error. This commit instead returns nil of the path is nil, otherwise
it attempts to build a URI for the path.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the Workspace Symbol Provider was not outputting DataTypes and was
unnecessarily output debuging information for Facts.  This commit adds support
for DataTypes and ignores Facts.  This commit also updates typos in the code
comments.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the workspace detection would use the RootURI even if it was nil.
This commit changes the detection to see if the RootURI key exists AND the value
is not nil.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 15, 2020
Previously the Workspace Symbols request was not tested as part of the
acceptance suite.  This commit adds a Workspace symbols request test and
refactors the mock editor client to make it easier to be consumed during
development.
@glennsarti glennsarti changed the title [1.0] Possible bugs [1.0] Fix Workspace Symbol Provider Jul 15, 2020
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 17, 2020
Previously if nil was passed into the build_file_uri method it would raise an
obtuse error. This commit instead returns nil of the path is nil, otherwise
it attempts to build a URI for the path.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 17, 2020
Previously the Workspace Symbol Provider was not outputting DataTypes and was
unnecessarily output debuging information for Facts.  This commit adds support
for DataTypes and ignores Facts.  This commit also updates typos in the code
comments.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 17, 2020
Previously the workspace detection would use the RootURI even if it was nil.
This commit changes the detection to see if the RootURI key exists AND the value
is not nil.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jul 17, 2020
Previously the Workspace Symbols request was not tested as part of the
acceptance suite.  This commit adds a Workspace symbols request test and
refactors the mock editor client to make it easier to be consumed during
development.
jpogran added a commit that referenced this issue Jul 17, 2020
(GH-269) Fix Workspace Symbol Provider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant