-
Notifications
You must be signed in to change notification settings - Fork 1.8k
document extensible
and additional
in QL reference and spec
#20571
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
Conversation
6050df9
to
80c2ac8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR documents the extensible
and additional
annotations in QL reference documentation and language specification to address a missing documentation issue. The changes ensure these annotations are properly explained alongside existing annotations like external
.
- Added comprehensive documentation for
extensible
andadditional
annotations in the annotations reference - Updated language specification to mention
extensible
alongsideexternal
in relevant contexts - Added missing index entries and cross-references for signatures documentation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
docs/codeql/ql-language-reference/signatures.rst | Added index entries and section references for predicate, type, and module signatures |
docs/codeql/ql-language-reference/ql-language-specification.rst | Updated specification to include extensible predicates alongside external predicates in evaluation context and body requirements |
docs/codeql/ql-language-reference/annotations.rst | Added documentation for additional and extensible annotations, updated availability lists for other annotations, and added signature-related cross-references |
80c2ac8
to
f0b3909
Compare
|
||
**Available for**: |classes|, |algebraic datatypes|, |type unions|, |non-member predicates|, |modules|, |aliases|, |signatures| | ||
|
||
The ``additional`` annotation can be used on declarations directly inside of modules that implement |module signatures|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does directly
in declarations directly inside of modules
mean here? I assume it relates to nested modules.
Can't we simplify it to something along the lines of:
The `additional` annotation can be used on declarations in modules. All declarations in modules with |module signatures| that are not required by a module signature must be annotated with `additional`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
directly
indeclarations directly inside of modules
mean here? I assume it relates to nested modules.
Yes.
What does
directly
indeclarations directly inside of modules
mean here? I assume it relates to nested modules.Can't we simplify it to something along the lines of:
The `additional` annotation can be used on declarations in modules. All declarations in modules with |module signatures| that are not required by a module signature must be annotated with `additional`.
I've pushed another commit. I didn't take your wording directly, because I want to keep "modules that implement module signatures" rather than "modules with module signatures" to avoid ambiguity with modules that contain a module signature declaration.
The first two commits are unrelated changes to fill in other missing references.
When incorporating
extensible
into the spec (commit 6), I essentially just did a textual search forexternal
and made sure to always mentionextensible
alongside it as appropriate. That's when I noticed the mention ofexternal
on member predicates (commit 5). I'm unsure whether in the past we allowedexternal
on member predicates, but as far as I can tell from looking atQLChecker
, we don't allow it now.Note that I have not added anything further in the language spec on
additional
. The reason is that the annotation doesn't do anything aside from affecting errors.