-
Notifications
You must be signed in to change notification settings - Fork 219
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 maven repository discovery #518
Conversation
Fixes the maven repository discovery by checking if the candidate paths have a `/repository` directory. An exception is thrown if no valid repository paths are found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me 🙂
Reformat single expression `createPathOrNull` function. Co-authored-by: fwcd <[email protected]>
Co-authored-by: fwcd <[email protected]>
Ok cool. I'll let you guys squash when merging then 👍 |
All PR comments seems to be resolved, so merging. Thank you @calamont ! 😄 |
?: throw KotlinLSException( | ||
"No repositories found at \$MAVEN_REPOSITORY, \$MAVEN_HOME, \$M2_HOME or \$HOME/.m2" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the exception might have broken all clients that didn't have a Maven repository (e.g. #564). We should really be a bit more careful with silently changing the type of something, this had to be optional for the class path resolver logic to work properly...
Related to #430
Fixes the Maven repository discovery by checking if the candidate paths have a
/repository
directory. An exception is thrown if no valid repository paths are found. The order of discovery is maintained as before:$MAVEN_REPOSITORY
$MAVEN_HOME
$M2_HOME
$HOME/.m2