pub struct GitlabCiEcosystem { /* private fields */ }Expand description
GitLab CI ecosystem implementation.
Provides LSP functionality for .gitlab-ci.yml/.gitlab/ci/*.yml/*.yaml files — see
crate docs for the pin contract.
Implementations§
Source§impl GitlabCiEcosystem
impl GitlabCiEcosystem
Sourcepub fn new(cache: Arc<HttpCache>) -> Self
pub fn new(cache: Arc<HttpCache>) -> Self
Creates a new GitLab CI ecosystem with a default (unset, process-default-policy)
context — used by simple construction paths that don’t need a live
registries.gitlab_instance_host/registries.workspace_registries wiring (tests,
doctests).
Sourcepub fn with_context(
cache: Arc<HttpCache>,
policy: Arc<RegistryAccessPolicy>,
gitlab_instance_host_raw: Arc<RwLock<Option<String>>>,
) -> Self
pub fn with_context( cache: Arc<HttpCache>, policy: Arc<RegistryAccessPolicy>, gitlab_instance_host_raw: Arc<RwLock<Option<String>>>, ) -> Self
Creates a GitLab CI ecosystem sharing live policy/gitlab_instance_host handles —
the production wiring path (deps-lsp’s register_ecosystems), mirroring
NuGetEcosystem/PypiEcosystem’s identical with_context precedent.
gitlab_instance_host_raw is the feature-agnostic Arc<RwLock<Option<String>>> cell
deps-lsp’s EcosystemRuntime owns (spec §4.5’s revision-3 note); this constructor
is the one place it becomes a crate-local GitlabInstanceHost.
Trait Implementations§
Source§impl Ecosystem for GitlabCiEcosystem
impl Ecosystem for GitlabCiEcosystem
Source§fn manifest_filenames(&self) -> &[&'static str]
fn manifest_filenames(&self) -> &[&'static str]
GitLab does not accept .gitlab-ci.yaml — only .gitlab-ci.yml is recognized
(spec FR-001).
Source§fn manifest_directory_patterns(&self) -> &[(&'static str, &'static str)]
fn manifest_directory_patterns(&self) -> &[(&'static str, &'static str)]
The standard split-pipeline convention GitLab itself documents. This is the whole of v1’s detection: a child pipeline at a conventionless path is not detected (spec FR-001).
Source§fn parse_manifest<'a>(
&'a self,
content: &'a str,
uri: &'a Uri,
) -> BoxFuture<'a, Result<Box<dyn ParseResultTrait>>>
fn parse_manifest<'a>( &'a self, content: &'a str, uri: &'a Uri, ) -> BoxFuture<'a, Result<Box<dyn ParseResultTrait>>>
Parses the manifest, then registers its routes into the shared registry and
downgrades any dependency whose route the process-wide cap refused to
CustomRegistry + HostRef::CapacityRefused (spec §3.2/§4.6) before returning —
the same downgrade shape (#466 review M-a) crate::parser’s per-document host cap
already produces, so the two capacity-refusal paths agree.
Source§fn generate_completions<'a>(
&'a self,
parse_result: &'a dyn ParseResultTrait,
position: Position,
content: &'a str,
freshness: FreshnessSettings,
) -> BoxFuture<'a, Completions>
fn generate_completions<'a>( &'a self, parse_result: &'a dyn ParseResultTrait, position: Position, content: &'a str, freshness: FreshnessSettings, ) -> BoxFuture<'a, Completions>
Version completions only, resolved through the source-aware
deps_core::completion::complete_versions_generic_from (spec §7a.1) — the
source-unaware default would return nothing, since this crate’s Registry never
resolves an unsourced fetch. The dependency’s source is resolved by position,
not by name: a project: and a component: include of the same project can share
one PackageName (spec §3.1’s documented residual collision), and a by-name lookup
would risk picking the wrong one’s source.
Source§fn generate_diagnostics<'a>(
&'a self,
parse_result: &'a dyn ParseResultTrait,
versions: VersionData<'a>,
uri: &'a Uri,
freshness: FreshnessSettings,
severities: DiagnosticSeverities,
) -> BoxFuture<'a, Vec<Diagnostic>>
fn generate_diagnostics<'a>( &'a self, parse_result: &'a dyn ParseResultTrait, versions: VersionData<'a>, uri: &'a Uri, freshness: FreshnessSettings, severities: DiagnosticSeverities, ) -> BoxFuture<'a, Vec<Diagnostic>>
Appends the FR-012 informational unresolved-host diagnostic to the shared default’s output, for every dependency whose host could not be statically determined.
Source§fn generate_hover<'a>(
&'a self,
parse_result: &'a dyn ParseResultTrait,
position: Position,
versions: VersionData<'a>,
freshness: FreshnessSettings,
) -> BoxFuture<'a, Option<Hover>>
fn generate_hover<'a>( &'a self, parse_result: &'a dyn ParseResultTrait, position: Position, versions: VersionData<'a>, freshness: FreshnessSettings, ) -> BoxFuture<'a, Option<Hover>>
Splices a **Resolved** line for a SHA pin (via the shared tag index) and, for a
component: include only, a **Project** link line — the one NFR-004 hover
divergence this ecosystem has (spec §8.1/§8.2).
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Source§fn lockfile_filenames(&self) -> &[&'static str]
fn lockfile_filenames(&self) -> &[&'static str]
Source§fn formatter(&self) -> &dyn EcosystemFormatter
fn formatter(&self) -> &dyn EcosystemFormatter
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_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>>
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 more