-
Notifications
You must be signed in to change notification settings - Fork 31
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
Consider profiles in the maven.config as well #553
Consider profiles in the maven.config as well #553
Conversation
That looks good to me. However, I recommend if possible that you try to add some tests for such features as lemminx-maven is a pretty "mutable" project that's relatively prone to regressions. The good news is that writing tests is very easy. |
Can you suggest a simple testcase that checks for a property present in the project? It then should be straight forward to add such test. |
This has no strong meaning in LSP land, as the grain is Text/UI. |
Ok is there any such hover test I can then reuse? Another would be error markers, I can use a version with a property and it should not show any errors... |
You can get inspiration from MavenPropertyHoverTest. There is no test that deals with profiles currently nor maven.config, so you'll probably need to create a some new test resources to consume. |
5221f99
to
7a8281e
Compare
@mickaelistria I tried to add some test but they failed, as there is not much context beside that it seems I can't get the hover do you have any hint what might be wrong or causing that? Any additional logs I could look at? |
You can configure Java logging as usual to enable more logging, but can't you just debug those tests? That would be much more efficient. |
I now used just the debugger and found that lemminx is not using an |
7a8281e
to
2db37ef
Compare
@mickaelistria I got it now working with the test, if this is merged, is there a chance to have a new release of lemminx? |
lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/project/MavenProjectCache.java
Outdated
Show resolved
Hide resolved
One can define profiles in the .mvn/maven.config file but currently these are ignored by lemminx leading to unexpected or even fault project models. This now parses the profile option form the maven config and pass them to the building request. Also adding two test cases that check properties are taken into account.
2db37ef
to
d99bda8
Compare
@mickaelistria do you plan a new LemMinX release any time soon? I would like to release m2e 2.6.0 actually not later than tomorrow evening and it would be nice if this could be included too. |
Done at https://github.com/eclipse/lemminx-maven/releases/tag/0.11.1 |
Thanks for the fast release. I'm about to update m2e to it: |
One can define profiles in the .mvn/maven.config file but currently these are ignored by lemminx leading to unexpected or even fault project models.
This now parses the profile option form the maven config and pass them to the building request.
Like we do in m2e already, @mickaelistria do you can review?