Skip to content
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

Fix handling for unknown JUnit segment types #128

Merged
merged 7 commits into from
Dec 2, 2024

Conversation

lihaoyi
Copy link
Contributor

@lihaoyi lihaoyi commented Dec 2, 2024

Necessary to get sbt-jupiter-interface working with Kotlin's Kotest com-lihaoyi/mill#4048

Rather than skipping the entire unknown segment types, we filter out "suite" segments explicitly (which appears to be what we actually need to do, e.g. in

) and leave unknown segment types as space-separated. We perform a final .trim on the generated string to ensure any leading spaces are removed, since when generating the strings for each segment we do not know whether it will be the leading segment or not

This appears to have been broken in https://github.com/sbt/sbt-jupiter-interface/pull/126/files, where returning null caused the entire test identifier to not render

It's not entirely clear to me why we filter out the suite segments to begin with, but given that we do this seems like the better way to do it

@lihaoyi lihaoyi changed the title Add support for Kotest JUnit segment types Fix handling for unknown JUnit segment types Dec 2, 2024
@lihaoyi
Copy link
Contributor Author

lihaoyi commented Dec 2, 2024

CC @jodersky @eed3si9n

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks!

@jodersky
Copy link
Member

jodersky commented Dec 2, 2024 via email

@lihaoyi
Copy link
Contributor Author

lihaoyi commented Dec 2, 2024

Thanks for the reviews! @eed3si9n could we merge and publish this?

@eed3si9n eed3si9n merged commit 02e4226 into sbt:main Dec 2, 2024
5 checks passed
@eed3si9n
Copy link
Member

eed3si9n commented Dec 2, 2024

@lihaoyi
Copy link
Contributor Author

lihaoyi commented Dec 3, 2024

Thanks! Will give it a spin

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.

3 participants