pub fn parse_gitlab_ci_yaml(
content: &str,
uri: &Uri,
policy: &RegistryAccessPolicy,
instance_host: &GitlabInstanceHost,
) -> Result<GitlabCiParseResult, DepsError>Expand description
Parses a .gitlab-ci.yml-syntax file and returns every include: dependency found,
with LSP position tracking, host resolution, and routing.
Gated first by deps_core::check_yaml_nesting_depth/deps_core::check_yaml_expansion,
which return a real DepsError::ParseError. A downstream YAML syntax error degrades to
an empty GitlabCiParseResult (logged at debug) rather than propagating.
§Errors
Returns DepsError::ParseError only when content exceeds the shared YAML
nesting-depth or expansion-size gate.
§Examples
use deps_core::Dependency;
use deps_core::net_policy::RegistryAccessPolicy;
use deps_gitlab_ci::GitlabInstanceHost;
use deps_gitlab_ci::parse_gitlab_ci_yaml;
use std::sync::{Arc, RwLock};
let content = "include:\n - project: org/proj\n ref: v1.0.0\n";
let uri = deps_core::test_util::test_uri("/repo/.gitlab-ci.yml");
let policy = RegistryAccessPolicy::default();
let instance_host = GitlabInstanceHost::new(Arc::new(RwLock::new(None)), Arc::new(policy));
let policy = RegistryAccessPolicy::default();
let result = parse_gitlab_ci_yaml(content, &uri, &policy, &instance_host).unwrap();
assert_eq!(result.dependencies.len(), 1);