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

improvement: Retry with coursier jar if anything fails #1514

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented May 29, 2024

Previously, if anything failed with coursier native image, for example we wouldn't have proper encoding then user would not be able to do anything.

Now, if there is Java avaialable we can retry with the embedded coursier jar.

Might help with #1509

outputChannel.appendLine(
"Trying again with the embedded coursier. This might take longer."
);
return fetchAndLaunchMetals(context, serverVersion, javaVersion, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

If you rerun the whole fetchAndLaunchMetals it will again try to download coursier, this seems redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reworked it while resolving coursier:

  if (forceCoursierJar) {
    coursier = undefined;
  } else {
    coursier = await resolveCoursier();
  }

Previously, if anything failed with coursier native image, for example we wouldn't have proper encoding then user would not be able to do anything.

Now, if there is Java avaialable we can retry with the embedded coursier jar.
@tgodzik tgodzik merged commit 517408e into scalameta:main Jun 12, 2024
10 checks passed
@tgodzik tgodzik deleted the last-chance branch June 12, 2024 13:28
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