Skip to content

Conversation

@E14
Copy link

@E14 E14 commented Oct 22, 2025

Validating a default value can succeed, fail, or be unsupported.

Partly resolves / mitigates #396

Before:
image

After:
image

@E14 E14 marked this pull request as draft October 22, 2025 20:36
@angelozerr
Copy link
Contributor

Your PR looks promising!

Could you sign please eca.

I think you should adjust some tests or add new tests.

Validating a default value can succeed, fail, or be unsupported

Signed-off-by: E14 <[email protected]>
@E14 E14 force-pushed the default-values-no-fail-on-unsupported-types branch from 90b8f20 to 81884bb Compare October 23, 2025 00:58
@E14
Copy link
Author

E14 commented Oct 23, 2025

Could you sign please eca.

Done!

I think you should adjust some tests or add new tests.

Fully agree - I mostly created this PR to use the CI because master is not stable (😑). Give me a bit though, I took too long today getting a spammable mailbox that both eclipse and github accept so I can connect the ECA

Glad the basic idea looks good to you though!

d1, d2, d3, d4, d5);
}

@Test
Copy link
Author

Choose a reason for hiding this comment

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

This test (and others that are built similar) is unstable for me (and it seems gh CI) - sometimes it doesn't report any diagnostics.

I'm assuming there is issue resulting from an async result taking just a tiny bit too long, I don't know how to avoid it other than changing the assertion helper method to use busy waiting like awaitility does. That would however only work reliably with at least one diagnostic, and also cause higher CPU load during tests (tests are already being aborted by CI due to taking too long)

Copy link
Author

Choose a reason for hiding this comment

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

So, I dug a bit (a lot) deeper into this issue yesterday, and it seems it cannot be resolved by retrying.

I was able to narrow it down to "somewhere before" MicroProfileConfigASTValidator#isAdaptedForDiagnostics, because when this method returns false (meaning when JDTTypeUtils.findType(javaProject, CONFIG_PROPERTY_ANNOTATION) returns null), it will always do so for the test run. This leads me to believe it's related to project loading (but the project data seems fine)

At that point, I'm out - I hope you can agree that this is well out of scope for this PR and stability issues of the test have nothing to do with my changes.

@E14 E14 marked this pull request as ready for review October 30, 2025 00:03
@angelozerr
Copy link
Contributor

@E14 please see the issue #511 I am working on it

@E14
Copy link
Author

E14 commented Nov 7, 2025

@E14 please see the issue #511 I am working on it

It seems like a larger project, do you want to merge this PR and then #511 or cancel and just do #511?

Also, would you like my input on it? Because I do have additional points at least

@angelozerr
Copy link
Contributor

I also thought it was a big project, but since we have more issues related to this super annoying problem, I spent all day yesterday working on this idea and I managed to run the converters from a microprofile application like Quarkus in a POC project that has nothing to do with LSP4MP. I'm currently integrating my POC, and if it works well, I hope it will be available next week.

I'm sorry to have made you work for nothing, I'm really sorry -( If my idea doesn't work, I'll merge your PR. I'll keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants