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

feat: add arrow-import runtime semantic #226

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Feb 27, 2023

The import dependency of programs is not a tree, but a DAG (Directed Acyclic Graph). For example, an utility function may be used by many scopes. A tree structure cannot handle this, as there's only one parent for a tree node.

Now we can add an arrow from one scope to another to mark a manual import relation.

Screenshot 2023-02-27 at 5 18 33 PM

@lihebi lihebi merged commit ea55b87 into codepod-io:main Feb 27, 2023
@forrestbao
Copy link
Collaborator

Using arrows occasionally or in short distances is fine. But

  1. the repo may be prone to become go-to.
  2. drawing arrows is a laborious mouse operation, unscalable
  3. too many arrows make the canvas messy.

So besides arrows, we can have use some code-based solution. For example, enrich the @export decorator, like @export('siblings') or @export('recursive')

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

Successfully merging this pull request may close these issues.

2 participants