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

bugfix: Try to download semanticdb even if it might not be supported #1821

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Sep 28, 2022

Previously, we would not download semanticdb even if it was backpublished. Now, we will try to download, but not print any warning if it's unsupported.

Previously, we would not download semanticdb even if it was backpublished. Now, we will try to download, but not print any warning if it's unsupported.
@tgodzik tgodzik merged commit 0365836 into scalacenter:main Sep 28, 2022
Copy link
Collaborator

@kpodsiad kpodsiad left a comment

Choose a reason for hiding this comment

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

Couple of late questions, I'm trying to understand what's going on.

Comment on lines +214 to +215
val isSupportedVersion =
scalaSemanticdbSettings.supportedScalaVersions.exists(scalaVersion.startsWith(_))
Copy link
Collaborator

Choose a reason for hiding this comment

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

How bloop knows which scala version supports semanticDB and which doesn't?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Metals sends that information, but since we backpublish Metals no longer has that information.

Comment on lines +231 to +232
// We try to download anyway, but don't print the exception
case _ =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain what will happen if downloading semanticDB fails? Is this possible that user won't have code navigation and no indication why?

Also, I think comment might have better description, as this action (downloading) already took place and we handling failed case. For instance:

        // We tried to download semanticDB but scala version is unsupported - don't warn the user about it.
        case Left(cause) =>
          logger.debug(cause) (or sth along these lines?)
          None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you explain what will happen if downloading semanticDB fails? Is this possible that user won't have code navigation and no indication why?

No, they will always get the information that semanticdb options are missing. I decided not to show it to the user as a notification if the version is not expected to be supported. I could change that, but this should ideally not happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will update it when doing another change.

@tgodzik tgodzik deleted the try-download branch September 29, 2022 08:08
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.

None yet

3 participants