Skip to content
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

Move all indexing expressions when calculating dependsOn expressions #15580

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
4 changes: 2 additions & 2 deletions src/Bicep.Cli/Rpc/CliJsonRpcServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public async Task<GetDeploymentGraphResponse> GetDeploymentGraph(GetDeploymentGr
{
var compilation = await GetCompilation(compiler, request.Path);
var model = compilation.GetEntrypointSemanticModel();
var dependenciesBySymbol = ResourceDependencyVisitor.GetResourceDependencies(model, new() { IncludeExisting = true })
var dependenciesBySymbol = ResourceDependencyVisitor.GetResourceDependencies(model)
.Where(x => !x.Key.Type.IsError())
.ToImmutableDictionary(x => x.Key, x => x.Value);

Expand All @@ -200,7 +200,7 @@ public async Task<GetDeploymentGraphResponse> GetDeploymentGraph(GetDeploymentGr
foreach (var (symbol, dependencies) in dependenciesBySymbol)
{
var source = nodesBySymbol.TryGetValue(symbol);
foreach (var dependency in dependencies.Where(d => d.Kind == ResourceDependencyKind.Primary))
foreach (var dependency in dependencies)
{
var target = nodesBySymbol.TryGetValue(dependency.Resource);
if (source is { } && target is { })
Expand Down
Loading
Loading