document extensible and additional in QL reference and spec#20571
document extensible and additional in QL reference and spec#20571
extensible and additional in QL reference and spec#20571Conversation
6050df9 to
80c2ac8
Compare
There was a problem hiding this comment.
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
extensibleandadditionalannotations in the annotations reference - Updated language specification to mention
extensiblealongsideexternalin 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.
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.
What does
directlyindeclarations directly inside of modulesmean here? I assume it relates to nested modules.
Yes.
What does
directlyindeclarations directly inside of modulesmean 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
extensibleinto the spec (commit 6), I essentially just did a textual search forexternaland made sure to always mentionextensiblealongside it as appropriate. That's when I noticed the mention ofexternalon member predicates (commit 5). I'm unsure whether in the past we allowedexternalon 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.