Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

feat: support new 2.13 artifacts #429

Merged
merged 2 commits into from
Mar 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/fetchMetals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ export function fetchMetals({
(p) => !p.startsWith("-agentlib")
);

const binaryVersion = serverVersion > "0.11.2" ? "2.13" : "2.12";
Copy link
Member Author

Choose a reason for hiding this comment

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

This comparison seems a bit terrifying, but I guess alphabetical order is sufficient here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, it's not ok for 0.11.2-RC1 or something

Copy link
Member Author

@tanishiking tanishiking Mar 10, 2022

Choose a reason for hiding this comment

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

Ok, metals-languageclient has semver as dependency and we can use that 👍

const serverDependency = serverVersion.includes(":")
? serverVersion
: `org.scalameta:metals_2.12:${serverVersion}`;
: `org.scalameta:metals_${binaryVersion}:${serverVersion}`;

return spawn(
javaPath,
Expand Down