OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.14k stars 582 forks source link

Assistance for editing Liberty configuration #14054

Open yeekangc opened 3 years ago

yeekangc commented 3 years ago

Provide developers with assistance like validations, auto completion and quick fixes when they work with Liberty configuration files particularly the server.xml file. Enable developers to do so from any editor or IDE of their choice that Liberty will support.

A solution is to develop a language server for Liberty configuration files (server.xml, bootstrap.properties, server.env). The language server can in turn be made available in the various editors/IDEs through Open Liberty Tools.

See a prototype here: https://github.com/OpenLiberty/liberty-language-server

An early release of the Liberty Config LS, e.g., for inclusion in #21055, may be scoped to editing support like validation and auto-completion for server.xml only.

When ready, add links to the Upcoming Feature Overview document and Feature Test Summary issue:

Instructions:

Design

Before Development Starts or 8 weeks before Onboarding

Legal

3 weeks before Onboarding

Translation

3 weeks before Onboarding

Feature Complete

2 weeks before Onboarding

Focal Point Approvals

2 to 1 week before Onboarding

You MUST have the Design Approved or No Design Approved label before requesting focal point approvals.

All features (both "Design Approved" and "No Design Approved")

"Design Approved" features

Ready for GA

1 week before Onboarding

Other deliverbles

yeekangc commented 3 years ago

Assigning to @rzgry @kathrynkodama. Cc @ericglau.

tevans78 commented 3 years ago

UFO review comments & follow-on items:

cherylking commented 2 years ago

@NottyCode I have updated the UFO at the Box link for the review comments. Each updated slide includes (updated) in the title.

  • Slide 22: Questions about which features may be configured. Can you configure incompatible features together? Can a feature be configured which is not installed in the runtime? There are a variety of error paths than need to be considered. Follow up with Alasdair.

Features can be configured that are not installed. The main user scenario is using dev mode which will handle installing the configured features.

Incompatible features can also be detected by dev mode, and we will look into a future enhancement in the language server to display a diagnostic to the user for those features. Opened issue 70 to track that.

  • Slide 28: Will there be completion support for using property references in server.xml? Only well known properties or any defined in server.env or bootstrap.properties? Then, as a secondary item, where properties have been referenced in server.xml, provide content assist to help define those properties in server.env/bootstrap.properties.

Adding completion support for property references in server.xml will be a future enhancement. It should include any property/variable defined in server.xml, bootstrap.properties or server.env. Issue 68 for tracking.

If a property reference in server.xml does not match a defined property/variable, a future enhancement would provide a quick fix to create a variable by that name in server.xml. Issue 69 for tracking.

  • Slide 34: Need to have an issue open to support config overrides. Also need to consider supporting when the config dir itself has been overridden (server.xml etc in a non-standard folder).

The slide has been updated to indicate config overrides are supported. Issue 66 has been opened for a future enhancement to support an alternate configDirectory or file (Maven/Gradle allow serverXmlFile, bootstrapPropertiesFile and serverEnvFile to be overridden).

  • Slide 36: Issue required to cover providing feature suggestions when config element is used but the feature is not currently listed.

Issue 67 has been opened to track this as a future enhancement. The slide has been updated.

  • Slide 45: Will the language server be made available as a beta?

Slide has been updated to indicate the language server will be included in an early release of the Liberty Developer Tools v2 Eclipse IDE.

  • What is the actual deliverable (jar, war etc)? What does it run on? Can we run it on Liberty? (We should run it on Liberty if we can)

There are two jar files that will be delivered. The lemminx-liberty jar is placed on the classpath of the IDE and is loaded by the lemminx extension. The language-server jar will be pulled in by whichever IDE extension we (IBM) has provided for Liberty, whether it be Eclipse, IntelliJ or MS VSCode. I don't understand why it is being asked if it can run on Liberty.

cherylking commented 1 year ago

Noting here that we plan to release a 1.0 version of the Liberty Config Language Server that is compatible with Eclipse LemMinX 0.22.0 through 0.24.0 and will be utilized by Liberty Tools for Eclipse, and a 2.0 version that is compatible with Eclipse LemMinX 0.25.0 and will be utilized by Liberty Tools for IntelliJ IDEA and Liberty Tools for Visual Studio Code. Both the 1.0 and 2.0 artifacts need to be published by the end of May in order to get pulled into the three IDE releases that will happen between June 2nd and June 9th. We are waiting for SVT to complete and add their approval.

cherylking commented 4 months ago

Status of remaining issues that were not part of MVP:

Those issues that are not done will not be worked on in the near future. Our priorities have shifted.

@NottyCode @yeekangc Should this epic be closed for the work that has been completed and a separate one opened for the remaining items? Or should the current epic remain open and get marked as not "In Progress" until we pick it back up?