Skip to content

fix: Fix manifest fetcher #5865

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

Merged
merged 1 commit into from
Jul 8, 2025
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
import software.aws.toolkits.jetbrains.core.saveFileFromUrl
import java.nio.file.Path

class ManifestFetcher(
private val lspManifestUrl: String = getManifestEndpoint(),
private val manifestPath: Path = DEFAULT_MANIFEST_PATH,
) {
class ManifestFetcher {

Check warning on line 24 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt#L24

Added line #L24 was not covered by tests
companion object {
private val mapper = jacksonObjectMapper().apply { configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) }
private val logger = getLogger<ManifestFetcher>()
Expand All @@ -41,6 +38,10 @@
.resolve("jetbrains-lsp-manifest.json")
}

private val lspManifestUrl
get() = getManifestEndpoint()
Copy link
Contributor

Choose a reason for hiding this comment

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

We removed this from companion object since this function should not be called during build time

private val manifestPath: Path = DEFAULT_MANIFEST_PATH

Check warning on line 43 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt#L42-L43

Added lines #L42 - L43 were not covered by tests

@get:VisibleForTesting
internal val lspManifestFilePath: Path
get() = manifestPath
Expand Down
Loading