Skip to content

Conversation

Jarvx
Copy link

@Jarvx Jarvx commented Oct 5, 2025

This is an AI-generated fix for issue #11829. The patch has been tested against version 4.9.0 (as suggested by the branch name).

I’m happy to discuss any improvements or suggestions!

@CLAassistant
Copy link

CLAassistant commented Oct 5, 2025

CLA assistant check
All committers have signed the CLA.

@graemerocher
Copy link
Contributor

for each of these AI generated patches we will need tests to verify that the bug that is being fixed is actually fixed. Without tests we can't accept the patch

@Jarvx
Copy link
Author

Jarvx commented Oct 6, 2025

for each of these AI generated patches we will need tests to verify that the bug that is being fixed is actually fixed. Without tests we can't accept the patch

Thanks. I'll push tests soon so that the team can review.

@Jarvx
Copy link
Author

Jarvx commented Oct 7, 2025

for each of these AI generated patches we will need tests to verify that the bug that is being fixed is actually fixed. Without tests we can't accept the patch

I have uploaded the test scripts (groovy scripts) for all the PRs I've made.

@graemerocher
Copy link
Contributor

ok but these test scripts are not actual tests and are not integrated with the rest of the build. For the PRs to be in an acceptable state actual tests need to be included

@Jarvx
Copy link
Author

Jarvx commented Oct 7, 2025

ok but these test scripts are not actual tests and are not integrated with the rest of the build. For the PRs to be in an acceptable state actual tests need to be included

Do you mean an actual micronaut app or a junit test ? Would you be able to give some initial comments on the tests and patches I have submitted? This helps with improvements from my side.

@graemerocher
Copy link
Contributor

I would expect for an issue like this which addresses something related to Kotlin that the PR would include a test similar to this one https://github.com/micronaut-projects/micronaut-core/blob/4.10.x/inject-kotlin/src/test/groovy/io/micronaut/kotlin/processing/beans/BeanDefinitionSpec.groovy that verifies the compiled code is correct the same way as your Groovy script does.

Having a random Groovy script in the root that reproduces doesn't help as it will never be executed and doesn't count as a test.

@Jarvx
Copy link
Author

Jarvx commented Oct 7, 2025

I would expect for an issue like this which addresses something related to Kotlin that the PR would include a test similar to this one https://github.com/micronaut-projects/micronaut-core/blob/4.10.x/inject-kotlin/src/test/groovy/io/micronaut/kotlin/processing/beans/BeanDefinitionSpec.groovy that verifies the compiled code is correct the same way as your Groovy script does.

Having a random Groovy script in the root that reproduces doesn't help as it will never be executed and doesn't count as a test.

I'd say this isn't a random script :

def testSuiteDir = new File("test-suite/src/test/groovy/io/micronaut/reproduce")

String kotlinSource = """

The script contains source and it creates the tests in a specific folder.
Regardless, I'll add some fixes later to extract them into the target folder.

@dstepanov
Copy link
Contributor

@Jarvx Simply take a look how tests are written in the project and create a test in a similar style.

val ctx = ApplicationContext.run()

// Correctly reference the class for Micronaut to create a bean
assertThrows<IllegalStateException> {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Jarvx If you fix this bug, Why do you expect an error? It turns out that after your fix there shouldn't be an error.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. I am working on a new fix currently. I'll close my existing PRs first.

@Jarvx Jarvx closed this Oct 17, 2025
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.

5 participants