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

Add check if all blueprint ports are connected #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kairichard
Copy link
Contributor

@kairichard kairichard commented Oct 15, 2019

The Problem

Unconnected outports of blueprints lead to two undesired effects:

  • if we pull on the port it will block all other data flowing forward on that port
  • exposing ports to the user that actually never carry data

Solution

Before the blueprint is started check if all outports are connected. Easier said than done.
For the edge case, that operator running is for actually that one -> https://bitspark.de/slang/docs/operator/iterate with a connected delegate, the ports appear to be not connected because of src being empty. But it still works.

Todo

  • figure out why delegates ports have no src

@td5r Ideas on how this can be done in a more robust way?

@@ -132,6 +132,7 @@ func Test_CtrlIterate__SimpleAggregation(t *testing.T) {
// Connect
require.NoError(t, ao.Delegate("iterator").Out().Connect(fo.Main().In()))
require.NoError(t, fo.Main().Out().Connect(ao.Delegate("iterator").In()))
require.NoError(t, ao.Main().Out().FullyConnected())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo to @td5r: control_iterate out port pushes data but 'port.FullyConnected' returns an error, which indicates, that out port is not connected ... why?!

@kairichard kairichard changed the title Add first check to ports that walks all sources. Add check if all blueprint ports are connected Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print error message for unconnected output ports of blueprint
2 participants