Struct GithubActionsEcosystem
pub struct GithubActionsEcosystem { /* private fields */ }Expand description
GitHub Actions ecosystem implementation.
Provides LSP functionality for .github/workflows/*.yml/*.yaml files, including:
- Dependency parsing with position tracking (see
parsermodule docs for the pin contract) - Version information from the GitHub tags API
- Inlay hints, hover, completions, diagnostics, and code actions/lenses via the
shared
deps_core::lsp_helpersmachinery
Implementations§
§impl GithubActionsEcosystem
impl GithubActionsEcosystem
pub fn new(cache: Arc<HttpCache>) -> GithubActionsEcosystem
pub fn new(cache: Arc<HttpCache>) -> GithubActionsEcosystem
Creates a new GitHub Actions ecosystem with the given HTTP cache.
Trait Implementations§
§impl Ecosystem for GithubActionsEcosystem
impl Ecosystem for GithubActionsEcosystem
§fn manifest_directory_patterns(&self) -> &[(&'static str, &'static str)]
fn manifest_directory_patterns(&self) -> &[(&'static str, &'static str)]
GHA declares no fixed filename or extension — it is routed solely by directory
path (D1): a .github/workflows/*.yml/*.yaml file, regardless of how many
ancestor directories precede .github.
§fn generate_diagnostics<'a>(
&'a self,
parse_result: &'a dyn ParseResult,
versions: VersionData<'a>,
uri: &'a Uri,
freshness: FreshnessSettings,
severities: DiagnosticSeverities,
) -> Pin<Box<dyn Future<Output = Vec<Diagnostic>> + Send + 'a>>
fn generate_diagnostics<'a>( &'a self, parse_result: &'a dyn ParseResult, versions: VersionData<'a>, uri: &'a Uri, freshness: FreshnessSettings, severities: DiagnosticSeverities, ) -> Pin<Box<dyn Future<Output = Vec<Diagnostic>> + Send + 'a>>
Appends the mutable-ref-pin diagnostic (issue #473) to the shared default’s
output, one per PinStyle::Tag step — an additive, independent signal from the
outdated-version diagnostic the shared default already computes (spec 031
NFR-004: this override never changes that behavior, only appends to it).
Gated on severities.mutable_ref_pin_enabled (spec 031 FR-009, corrected during
implementation review): severities.mutable_ref_pin alone cannot silence this
diagnostic, since DiagnosticSeverity has no suppression value.
§fn generate_code_actions<'a>(
&'a self,
parse_result: &'a dyn ParseResult,
position: Position,
uri: &'a Uri,
versions: VersionData<'a>,
content: &'a str,
) -> Pin<Box<dyn Future<Output = Vec<CodeAction>> + Send + 'a>>
fn generate_code_actions<'a>( &'a self, parse_result: &'a dyn ParseResult, position: Position, uri: &'a Uri, versions: VersionData<'a>, content: &'a str, ) -> Pin<Box<dyn Future<Output = Vec<CodeAction>> + Send + 'a>>
Appends the “Pin to commit SHA” quickfix (issue #473) to the shared default’s
output when the position’s dependency is a PinStyle::Tag step with a resolvable
TagIndex entry.
§fn generate_hover<'a>(
&'a self,
parse_result: &'a dyn ParseResult,
position: Position,
versions: VersionData<'a>,
freshness: FreshnessSettings,
) -> Pin<Box<dyn Future<Output = Option<Hover>> + Send + 'a>>
fn generate_hover<'a>( &'a self, parse_result: &'a dyn ParseResult, position: Position, versions: VersionData<'a>, freshness: FreshnessSettings, ) -> Pin<Box<dyn Future<Output = Option<Hover>> + Send + 'a>>
One documented NFR-004 divergence (S3): appends a **Resolved** line naming the
tag a SHA pin’s commit actually corresponds to, per
crate::registry::GithubActionsRegistry’s [crate::registry::TagIndex].
Necessary, not merely additive: versions.resolved (the shared helper’s
**Current** source) is keyed by package name and is unconditionally empty for
GHA (no lockfile provider), so it cannot express per-occurrence resolution when
the same action is pinned at two different SHAs in one workflow. The splice also
makes a stale or hand-edited # vX.Y.Z comment visible for free (M4): the tag
shown here comes from TagIndex.sha_to_tag, not from trusting the comment text.
Scoped to [PinStyle::Sha] only — the SHA is the one pin form GitHub itself does
not render as a readable version, so it is the only form where naming the tag it
resolves to adds information; a PinStyle::Tag pin already shows the tag text
directly. Guarded on dep.version_range().is_some() (N3): a non-resolvable
dependency (a reusable-workflow call, ./local, docker://…) still matches the
shared helper’s own hover-target predicate and must not have a **Resolved** line
spliced onto it.
§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
§fn manifest_filenames(&self) -> &[&'static str]
fn manifest_filenames(&self) -> &[&'static str]
§fn lockfile_filenames(&self) -> &[&'static str]
fn lockfile_filenames(&self) -> &[&'static str]
§fn parse_manifest<'a>(
&'a self,
content: &'a str,
uri: &'a Uri,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ParseResult>, DepsError>> + Send + 'a>>
fn parse_manifest<'a>( &'a self, content: &'a str, uri: &'a Uri, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn ParseResult>, DepsError>> + Send + 'a>>
§fn formatter(&self) -> &dyn EcosystemFormatter
fn formatter(&self) -> &dyn EcosystemFormatter
§fn generate_completions<'a>(
&'a self,
parse_result: &'a dyn ParseResult,
position: Position,
content: &'a str,
freshness: FreshnessSettings,
) -> Pin<Box<dyn Future<Output = Completions> + Send + 'a>>
fn generate_completions<'a>( &'a self, parse_result: &'a dyn ParseResult, position: Position, content: &'a str, freshness: FreshnessSettings, ) -> Pin<Box<dyn Future<Output = Completions> + Send + 'a>>
§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Source§fn manifest_extensions(&self) -> &[&'static str]
fn manifest_extensions(&self) -> &[&'static str]
[".csproj", ".fsproj"] for NuGet project files). Read moreSource§fn manifest_patterns(&self) -> &[&'static str]
fn manifest_patterns(&self) -> &[&'static str]
* wildcard (e.g. ["requirements*.txt"]). Read moreSource§fn watched_config_filenames(&self) -> &[&'static str]
fn watched_config_filenames(&self) -> &[&'static str]
Self::parse_manifest
(e.g. ["pnpm-workspace.yaml", ".npmrc"] for npm’s catalog and registry resolution),
whose values end up baked into a manifest’s ParseResult rather than looked up
separately the way a Self::lockfile_provider is. Read moreSource§fn lockfile_provider(&self) -> Option<Arc<dyn LockFileProvider>>
fn lockfile_provider(&self) -> Option<Arc<dyn LockFileProvider>>
Source§fn generate_inlay_hints<'a>(
&'a self,
parse_result: &'a dyn ParseResult,
versions: VersionData<'a>,
loading_state: LoadingState,
config: &'a EcosystemConfig,
) -> Pin<Box<dyn Future<Output = Vec<InlayHint>> + Send + 'a>>
fn generate_inlay_hints<'a>( &'a self, parse_result: &'a dyn ParseResult, versions: VersionData<'a>, loading_state: LoadingState, config: &'a EcosystemConfig, ) -> Pin<Box<dyn Future<Output = Vec<InlayHint>> + Send + 'a>>
Source§fn generate_document_links(
&self,
_parse_result: &dyn ParseResult,
_uri: &Uri,
) -> Vec<DocumentLink>
fn generate_document_links( &self, _parse_result: &dyn ParseResult, _uri: &Uri, ) -> Vec<DocumentLink>
textDocument/documentLink targets for the document. Read moreSource§fn generate_code_lenses<'a>(
&'a self,
parse_result: &'a dyn ParseResult,
content: &'a str,
versions: VersionData<'a>,
uri: &'a Uri,
command_id: &'a str,
) -> Pin<Box<dyn Future<Output = Vec<CodeLens>> + Send + 'a>>
fn generate_code_lenses<'a>( &'a self, parse_result: &'a dyn ParseResult, content: &'a str, versions: VersionData<'a>, uri: &'a Uri, command_id: &'a str, ) -> Pin<Box<dyn Future<Output = Vec<CodeLens>> + Send + 'a>>
Source§fn package_search_is_incomplete(&self) -> bool
fn package_search_is_incomplete(&self) -> bool
PypiRegistry::search’s doc comment). Read moreimpl Sealed for GithubActionsEcosystem
Auto Trait Implementations§
impl !RefUnwindSafe for GithubActionsEcosystem
impl !UnwindSafe for GithubActionsEcosystem
impl Freeze for GithubActionsEcosystem
impl Send for GithubActionsEcosystem
impl Sync for GithubActionsEcosystem
impl Unpin for GithubActionsEcosystem
impl UnsafeUnpin for GithubActionsEcosystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more