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

Imprecise error messages of has operations #1329

Closed
1 of 2 tasks
shaobo-he-aws opened this issue Nov 20, 2024 · 1 comment
Closed
1 of 2 tasks

Imprecise error messages of has operations #1329

shaobo-he-aws opened this issue Nov 20, 2024 · 1 comment
Labels
internal-improvement Refactoring, minor performance improvement, or other changes that Cedar users may never notice papercut Small annoyances in the Cedar SDK. Lower priority fixes than bugs. Smaller than a fature request

Comments

@shaobo-he-aws
Copy link
Contributor

Describe the improvement you'd like to request

Consider the following ill-formed policy,

permit(principal, action, resource) when { principal has if };

The CLI reports a parsing error as follows,

  × failed to parse policy set
  ╰─▶ this identifier is reserved and cannot be used: if
   ╭────
 1 │ permit(principal, action, resource) when { principal has if };
   ·                                            ────────────────
   ╰────

The error span should ideally only cover if, as opposed to the entire has expression.

Describe alternatives you've considered

No response

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this internal improvement
  • ⚠️ This feature might incur a breaking change
@shaobo-he-aws shaobo-he-aws added pending-triage The cedar maintainers haven't looked at this yet. Automicaly added to all new issues. internal-improvement Refactoring, minor performance improvement, or other changes that Cedar users may never notice pending-review A Cedar maintainer has looked at this, but believes it needs review by more of the core team papercut Small annoyances in the Cedar SDK. Lower priority fixes than bugs. Smaller than a fature request and removed pending-triage The cedar maintainers haven't looked at this yet. Automicaly added to all new issues. labels Nov 20, 2024
@john-h-kastner-aws john-h-kastner-aws removed the pending-review A Cedar maintainer has looked at this, but believes it needs review by more of the core team label Nov 25, 2024
@shaobo-he-aws
Copy link
Contributor Author

Fixed by #1327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-improvement Refactoring, minor performance improvement, or other changes that Cedar users may never notice papercut Small annoyances in the Cedar SDK. Lower priority fixes than bugs. Smaller than a fature request
Projects
None yet
Development

No branches or pull requests

2 participants