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

A consistent naming scheme for the LanguageService constructors , with backward compatibility functions. #473

Merged
merged 64 commits into from
Oct 23, 2024

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Oct 11, 2024

This renames allmost all language services towards consistency.

All verbs or all nouns did not work.

Instead these are all proper adjectives to the word "service". E.g. "parsing service" and "references service" and "build service". This is also the scheme of the original LSP services. The new scheme is also consistent with the names in Summary of the cached output of the respective lazy services.

This changes:

  • parser to parsing .. service
  • builder to build .. service
  • etc.

TODO's:

  • change service names to LSP 3.17 names, one-to-one
  • make new pico demo based on new names
  • add backward compatibility layer
  • fix the field and method and class names correspondingly in Java code
  • also apply renamings in Rascal code written for Rascal (e.g. Outline.rsc to DocumentSymbols.rsc)
  • test test test
  • check all documentation for the old names
  • inline the aliases for function profiles of the parameters of the LanguageService constructors (but leave the definitions for backward compatibility. Motivation: the aliases are opaque; you always have to look them up before you can define a language service.
  • merge with main
  • rename demo modules to make the new API the first choice.

…ouns did not work. Instead these are all proper adjectives to the word "service". E.g. "parsing service" and "references service" and "build service"
@jurgenvinju jurgenvinju changed the title renamed all language services towards consistency. All verbs or all nouns did not work. Instead these are all proper adjectives to the word "service". E.g. "parsing service" and "references service" and "build service" A consistent naming scheme for the LanguageService constructors , with backward compatibility functions. Oct 11, 2024
@jurgenvinju jurgenvinju requested a review from sungshik October 11, 2024 09:56
@jurgenvinju jurgenvinju self-assigned this Oct 13, 2024
@jurgenvinju jurgenvinju added the enhancement New feature or request label Oct 13, 2024
@jurgenvinju jurgenvinju marked this pull request as ready for review October 13, 2024 13:25
Copy link
Contributor

@sungshik sungshik left a comment

Choose a reason for hiding this comment

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

Great to make this more consistent! I added a few comments, but essentially, my two remaining questions are these:

  • Should we also rename arguments to make them consistent with constructors? (e.g., the argument of hover is now documentor)
  • Should we also rename everything (well...) in the Java code?

I don't have strong opinions on these questions; just want to raise them for consideration. See the comments for details.

Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

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

I think we're getting close to a new set of names, but still require some tweaking (most of my comments are replies to points of @sungshik, so better to read it in the "Files Changed" tab).

jurgenvinju and others added 4 commits October 14, 2024 12:24
…ummary.documentation to Summary.hovers and added documentation about the specific language services that used to be with the aliases
sungshik and others added 21 commits October 17, 2024 09:47
…es-flaky-test

More consistent service names flaky test
…es-java

Rename Java identifiers to be consistent with LSP
@jurgenvinju jurgenvinju marked this pull request as ready for review October 23, 2024 10:46
Copy link

sonarcloud bot commented Oct 23, 2024

@DavyLandman DavyLandman merged commit cd94730 into main Oct 23, 2024
13 checks passed
@sungshik sungshik deleted the more-consistent-service-names branch October 30, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reconsider names of the contributions in util::LanguageServer
3 participants