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

Naming the subgraph should be optional #55

Closed
KevinMarquette opened this issue Oct 22, 2017 · 1 comment
Closed

Naming the subgraph should be optional #55

KevinMarquette opened this issue Oct 22, 2017 · 1 comment

Comments

@KevinMarquette
Copy link
Owner

If you never reference a subgraph by name, do you even need to name it?

This is how it should look.

graph {
    subgraph {
        node A
    }
    node B
    Edge A -To B
}
@larssb
Copy link

larssb commented Jul 22, 2018

This works. However, if one defines a attributes hashtable on the subgraph like SubGraph @{style='filled';color='lightgrey'} -ScriptBlock { ... }. Without using the -Attributes parameter PSGraph fails with

Error: <stdin>: syntax error in line 4 near '.'
Export-PSGraph : System error.
At /gitRepos/PowerShellTooling/Public/PowerShellInfo/Out-PSModuleCallGraph.ps1:473 char:22
+         $graphData | Export-PSGraph -ShowGraph
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], ParseException
+ FullyQualifiedErrorId : System.Management.Automation.ParseException,Export-PSGraph

I guess its okay, but could maybe be improved. I would think that this happens because of parameter location awareness. If one cannot avoid using -Attributes the error message could be improved I think.

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants