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

[#1292] Explicitly state that table entries declared with 'const entries' cannot be assigned numeric priorities #1358

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kfcripps
Copy link

@kfcripps kfcripps commented Jan 21, 2025

Closes #1292 and closes p4lang/p4c#4792.

As mentioned in p4lang/p4c#4792, p4c does not support the priority keyword for entries of a table that has const entries.

Feel free to suggest better wording or a better place for this addition.

… assigned numeric priorities

Signed-off-by: kfcripps <kyle@pensando.io>
@kfcripps
Copy link
Author

I cannot request reviews in this repository, so instead I am tagging @jafingerhut @vlstill @ChrisDodd

Copy link
Collaborator

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jafingerhut
Copy link
Collaborator

@kfcripps Can you edit your original comment on this PR to mention that p4c's implementation does not support explicitly specifying priority values within const entries? (assuming I am recalling that correctly). I am not certain, but I believe that p4c never supported explicit priorities in this case, because when explicit priority support was added, it was done only for entries without const.

That is the kind of supporting detail that can help when/if this comes up in discussion in the language design work group.

@kfcripps
Copy link
Author

@kfcripps Can you edit your original comment on this PR to mention that p4c's implementation does not support explicitly specifying priority values within const entries? (assuming I am recalling that correctly). I am not certain, but I believe that p4c never supported explicit priorities in this case, because when explicit priority support was added, it was done only for entries without const.

That is the kind of supporting detail that can help when/if this comes up in discussion in the language design work group.

Done. I don't know if p4c never supported explicit priorities for entries of tables with const entries, but it did not support this as of when I opened p4lang/p4c#4792.

I cannot merge this so feel free to merge if you are all happy with the changes.

@vlstill vlstill self-requested a review January 21, 2025 19:12
@jafingerhut jafingerhut added the ldwg-discussion Plan to discuss at next LDWG label Jan 22, 2025
@jafingerhut
Copy link
Collaborator

Added ldwg-discussion label to this issue, to remind us to talk about it at the next LDWG meeting in February, if it has not been merged before then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ldwg-discussion Plan to discuss at next LDWG
Projects
None yet
2 participants