-
Notifications
You must be signed in to change notification settings - Fork 27
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
Update language server to support microprofile-config.properties #181
Comments
@jclingan thank's for having reported this issue. If I understand correctly Is that? |
Let me add @kenfinnigan. We would want any kind of property (quarkus, application, microprofile) supported by both property files. However, I want to check with Ken (who can pull in others if required) on having both property files at the same time for the same app. I wouldn't think we would want that. |
Is this anything more than adding an additional filename the editor and validation extension will react to ? |
If the idea is to have in The only thing that we must manage too is on JDT LS extension side which load application.properties to get the server port (to manage CodeLens URL (base url)). We will need to load the both files. |
codelens url ? what is that for ? What from the properties file does JDT LS need to get a base url ? (I assume here JDT LS is just for java content assist/validation but sounds like there is something else at play here ? ) |
It's for JAX-RS: See PR at redhat-developer/quarkus-ls#140 (comment) You can configure the port in
|
We definitely don't want both files present in the same app. For Quarkus we push for MP and Quarkus config to be in The use case would really only be for migrations from other frameworks that use MicroProfile. So the file only needs to support MicroProfile properties I think |
@kenfinnigan did you mean the same thing than my comments #181 (comment) ? |
Yes, sorry for confusion |
@angelozerr @kenfinnigan No, wait, not the same thing if i parse that comment correctly. Only one file should exist in a project, either microprofile-config.properties or application.properties. The chosen configuration file should contain all properties necessary to configure quarkus, microprofile, and the application. BTW, if both exist, things get ugly with "which one takes priority", etc. It's just easier to say one or the other. |
I would disagree that it makes sense for |
@jclingan @kenfinnigan once you will decide together what you want to have we will start implementing something. Please describe what you wish to have in detail (takes a sample and please tell me what you want to have (which properties for completion, etc). The thing that I understand is that it's not possible to have the two files Perhaps we could have an error on the top of application.properties (when it is opened) and in |
okey, but this feature seem to be useful for a bunch of other tech (like any jax-rs app) so I reckon this feature would need to be able to look in multiple locations anyway :) |
lets just keep this simple. the editor should work on any of these property files imo; no need to treat them differently at this stage. wether we are interested in adding hard or even soft validation of what kind of properties are in them I'm +0 on as with custom config sources I don't see how we can even validate based on filename what is expected or not. |
I got a +1 from @dmlloyd as well. Waiting to get feedback from @kenfinnigan. |
If consensus is to align them, I’m ok with that
…Sent from my iPhone
On Jan 8, 2020, at 17:00, John Clingan ***@***.***> wrote:
I got a +1 from @dmlloyd as well. Waiting to get feedback from @kenfinnigan.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Taking a look at other MicroProfile runtimes out there, it looks like they allow any property in any supported config source, but there is an order of precedence/priority. For quarkus, my tests (dev & prod modes) show that properties in application.properties overrides anything in microprofile-config.properties. I think that order is appropriate and supporting both simultaneously is proper behavior. @maxandersen, @kenfinnigan, @dmlloyd, agreed? |
OK, @angelozerr, via various methods we have come to an agreement. Here are the details;
|
@jclingan thank a lot for your detailed and very clear comment. We could start to manage microprofile-config.properties like application.properties which should not be hard. |
Thanks Angelo. When this is done, I can open a separate issue for the third bullet (underlining) when this issue is complete. I just wanted to give you a bit of direction of where we could go. |
You are welcome!
I will do that soon. You can now create an issue about the third bullet |
See redhat-developer#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer#181 Signed-off-by: azerr <azerr@redhat.com>
See #181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-quarkus#181 Signed-off-by: azerr <azerr@redhat.com>
Fixed with redhat-developer/quarkus-ls#199 |
Quarkus supports both src/main/resources/application.properties and src/main/resources/META-INF/microprofile-config.properties, the latter being the MicroProfile standard configuration file.
The language server supports application.properties but not microprofile-config.properties. This request is to add support for microprofile-config.properties to get syntax highlighting, code completion, etc.
The primary justification is that developers often like to develop portable code, and this request would help to achieve that goal while remaining productive. In addition, developers often want to try existing projects on Quarkus, and having code completion of existing microprofile-config.properties would greatly facilitate this use case without having to RTFM. Ex: "Re-hosting my project on Quarkus nearly works, but how the heck do I change the default http port"? Code-completion really helps with scenarios like this!
The text was updated successfully, but these errors were encountered: