-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Language server installation menu #1997
base: main
Are you sure you want to change the base?
Conversation
CodeEdit/Features/LSP/Registry/PackageManagers/CargoPackageManager.swift
Show resolved
Hide resolved
Will need to fix lint errors, but besides that it is ready for review. |
Fix those SwiftLint errors plz 😬 |
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’ve reviewed the Installation Queue and Package Managers so far. This PR is definitely too large for a single review, so I’ll go through the rest later. In the meantime, could you update your PR description as well?
} | ||
|
||
let packagePath = installationDirectory.appending(path: source.entryName) | ||
print("Installing \(source.entryName)@\(source.version) in \(packagePath.path)") |
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.
print("Installing \(source.entryName)@\(source.version) in \(packagePath.path)") |
} | ||
return output.starts(with: "cargo") | ||
} catch { | ||
print("Cargo version check failed: \(error)") |
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.
print("Cargo version check failed: \(error)") |
let repoPath = installPath.appending(path: source.pkgName, directoryHint: .isDirectory) | ||
_ = try await executeInDirectory(in: repoPath.path, [command]) | ||
} catch { | ||
print("Failed to build from source: \(error)") |
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.
print("Failed to build from source: \(error)") |
if !FileManager.default.fileExists(atPath: packagePath.path) { | ||
throw RegistryManagerError.downloadFailed( | ||
url: url, | ||
error: NSError(domain: "Coould not download package", code: -1) |
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.
error: NSError(domain: "Coould not download package", code: -1) | |
error: NSError(domain: "Could not download package", code: -1) |
} | ||
|
||
let packagePath = installationDirectory.appending(path: source.entryName) | ||
print("Installing Go package \(source.entryName)@\(source.version) in \(packagePath.path)") |
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.
print("Installing Go package \(source.entryName)@\(source.version) in \(packagePath.path)") |
|
||
print("Successfully installed \(source.entryName)@\(source.version)") | ||
} catch { | ||
print("Installation failed: \(error)") |
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.
print("Installation failed: \(error)") |
} | ||
|
||
let packagePath = installationDirectory.appending(path: source.entryName) | ||
print("Installing \(source.entryName)@\(source.version) in \(packagePath.path)") |
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.
print("Installing \(source.entryName)@\(source.version) in \(packagePath.path)") |
} | ||
|
||
let extras = source.options["extra"] | ||
if let extras = extras { |
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.
if let extras = extras { | |
if let extras { |
|
||
print("Successfully installed \(source.entryName)@\(source.version)") |
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.
print("Successfully installed \(source.entryName)@\(source.version)") |
|
||
print("Successfully installed \(source.entryName)@\(source.version)") | ||
} catch { | ||
print("Installation failed: \(error)") |
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.
print("Installation failed: \(error)") |
Description
A system to allow users to download and manage LSP servers from the settings menu. This utilizes the mason registry to track the language servers.
Related Issues
Checklist
Screenshots