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

Fix IDE warnings and remove usage of several deprecated fields. #6397

Merged
merged 3 commits into from Nov 13, 2023

Conversation

willbeason
Copy link
Member

Why the changes in this PR are needed?

Reducing the reliance on deprecated functions makes it easier to delete them later. Fixing these warnings reduces IDE clutter as IDEs highlight these and show them in code reports, increasing noise that might help devs identify issues that could actually represent problems.

What are the changes in this PR?

  • Replaced instances of deprecated .Path() with equivalent .Ref().GroundPrefix()
  • Replaced instances of deprecated .Args() with equivalent .FuncArgs().Args
  • Renamed variables to not collide with reserved words or imported packages

Copy link

netlify bot commented Nov 9, 2023

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 1c0def1
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/654d64dee3c9a80008e01a21
😎 Deploy Preview https://deploy-preview-6397--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 9, 2023

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit b05a02d
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/654d6500ad126a00087bde7f
😎 Deploy Preview https://deploy-preview-6397--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@willbeason willbeason self-assigned this Nov 9, 2023
@willbeason willbeason changed the title Fix IDE warnings and remove usage of several duplicated fields. Fix IDE warnings and remove usage of several deprecated fields. Nov 9, 2023
Signed-off-by: Will Beason <willbeason@gmail.com>
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @willbeason! LGTM. Only thing I'm not sure about is if Path() should be replaced by Ref() and not Ref().GroundPrefix(). cc @johanfylling

@willbeason
Copy link
Member Author

Yeah, the replace looks weird. It is equivalent (at least, according to tests), but it doesn't look good.

Copy link
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I believe all instances of .Path() that's been replaced here do expect the ground prefix; so the change is good 👍 .

@willbeason willbeason merged commit 8119dc0 into open-policy-agent:main Nov 13, 2023
24 checks passed
@willbeason willbeason deleted the fix-warnings branch November 13, 2023 16:22
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.

None yet

3 participants