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

chore: add PathExists to graph #410

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

chore: add PathExists to graph #410

wants to merge 2 commits into from

Conversation

miparnisari
Copy link
Member

@miparnisari miparnisari commented Jan 20, 2025

Description

The goal of this PR is to have openfga/openga eliminate its dependency to gonum. (https://github.com/openfga/openfga/blob/6d2f0703ae89caa4c94dd7678df73590edc9bfe8/go.mod#L50)

Therefore, I am moving most of this code and its tests https://github.com/openfga/openfga/blob/6d2f0703ae89caa4c94dd7678df73590edc9bfe8/pkg/typesystem/typesystem.go#L737 to this repository.

References

openfga/openfga#2104

@miparnisari miparnisari marked this pull request as ready for review January 20, 2025 19:43
@miparnisari miparnisari requested a review from a team as a code owner January 20, 2025 19:43
@@ -101,6 +101,23 @@ func (g *AuthorizationModelGraph) Reversed() (*AuthorizationModelGraph, error) {
return nil, fmt.Errorf("%w: could not cast to directed graph", ErrBuildingGraph)
}

// PathExists returns true if both nodes exist and there is a path starting at 'fromLabel' extending to 'toLabel'.
// If both labels are equal, it returns true.
Copy link
Member Author

@miparnisari miparnisari Jan 20, 2025

Choose a reason for hiding this comment

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

This behavior is weird to me, but it's expected. gonum/gonum#2014

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.

1 participant