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

Breaking Change in Casbin when updated from v2.54.0 to v2.68.0 #12

Closed
MrAwanishKumar opened this issue Apr 21, 2023 · 4 comments
Closed

Comments

@MrAwanishKumar
Copy link

Getting error when updated the casbin version to latest

# github.com/pckhoi/casbin-pgx-adapter ../../../../go/pkg/mod/github.com/pckhoi/casbin-pgx-adapter@v1.0.1/adapter.go:347:50: cannot use persist.LoadPolicyLine (value of type func(line string, m model.Model) error) as func(string, model.Model) value in argument to a.loadFilteredPolicy

Although it was already discussed in #6 and by downgrading to the v2.54.0 it is working.

I am looking for fixed with latest version of casbin.

Thanks

@hsluoyz
Copy link

hsluoyz commented Apr 21, 2023

@MrAwanishKumar what version of Casbin and casbin-pgx-adapter are you using?

casbin-pgx-adapter v2.2.0 and later versions should already support latest versions of Casbin, see: https://github.com/pckhoi/casbin-pgx-adapter/releases/tag/v2.2.0

@pckhoi
Copy link
Owner

pckhoi commented Apr 22, 2023

Maybe you can try github.com/pckhoi/casbin-pgx-adapter/v3. The tests seem to pass at least.

@MrAwanishKumar
Copy link
Author

@hsluoyz earlier I was using the older version of casbin v2.54.0 and casbin-pgx-adapter v1.0.1, was working fine but when I do update, the casbin updates to v2.68.0 and casbin-pgx-adapter remain on the same version v1.0.1. This causes the issue.

Now updated the both casbin to v2.68.0 and using casbin-pgx-adapter/v3 working fine.

Thank you @pckhoi and @hsluoyz

@MrAwanishKumar
Copy link
Author

Problem is solved. Closing this issue.

Thanks

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

3 participants