Paolo Tranquilli
de72e68d2c
Merge branch 'main' into redsun82/codegen-new-parent-child
2025-06-26 12:14:53 +02:00
Paolo Tranquilli
355fd85c23
Codegen: remove unneeded has|getNumberOf in instance tests
2025-06-25 12:02:13 +02:00
Paolo Tranquilli
6bbf1e3bc1
Codegen: use one generated test file per directory
...
This collapses all generated test QL sources into a single one per
directory, using query predicates to run the different tests.
This should improve the time required to run generated tests.
2025-06-25 11:44:54 +02:00
Paolo Tranquilli
1dcd60527c
Codegen: improve implementation of generated parent/child relationship
...
This improves the implementation of the generated parent/child
relationship by adding a new `all_children` field to `ql.Class` which
lists all children (both direct and inherited) of a class, carefully
avoiding duplicating children in case of diamond inheritance. This:
* simplifies the generated code,
* avoid children ambiguities in case of diamond inheritance.
This only comes with some changes in the order of children in the
generated tests (we were previously sorting bases alphabetically there).
For the rest this should be a non-functional change.
2025-06-24 17:26:24 +02:00
Paolo Tranquilli
14d48e9d58
Add black pre-commit hook
...
This switched `codegen` from the `autopep8` formatting to the `black`
one, and applies it to `bulk_mad_generator.py` as well. We can enroll
more python scripts to it in the future.
2025-06-10 12:25:39 +02:00
Paolo Tranquilli
ba89a5de6f
Codegen: make missing codeql error clearer
2025-04-30 11:38:52 +02:00
Paolo Tranquilli
7c8eb9ea0d
Codegen: implement db_table_name in cppgen
2025-03-19 15:14:15 +01:00
Paolo Tranquilli
f48aa79927
Codegen: implement db_table_name in qlgen
2025-03-19 15:14:15 +01:00
Paolo Tranquilli
fc9e066ecd
Codegen: implement db_table_name in dbschemegen
2025-03-19 15:14:14 +01:00
Paolo Tranquilli
841214f0f4
Codegen: introduce property-only pragmas
2025-03-19 15:14:14 +01:00
Paolo Tranquilli
06b349e307
Codegen: introduce name conflict error in dbschemegen
2025-03-19 12:15:45 +01:00
Cornelius Riemenschneider
53ca5083a9
Upgrade bazel to 8.0.0.
...
Previously, we were using 8.0.0rc1.
In particular, this upgrade means we need to explicitly
import more rules, as they've been moved out of the core bazel repo.
2024-12-10 12:05:37 +01:00
Paolo Tranquilli
b57a37479b
Rust: make File usable in codegen
2024-12-02 15:15:46 +01:00
Paolo Tranquilli
bd08bc7923
Rust: address review
2024-10-15 14:21:11 +02:00
Paolo Tranquilli
c364fd7e56
Codegen: allow annotations to replace bases and drop fields
2024-10-10 14:33:06 +02:00
Paolo Tranquilli
d2ebe00492
Codegen: move group to parametrized pragmas
2024-09-20 12:47:44 +02:00
Paolo Tranquilli
2533f18a6e
Codegen: move ql.hideable to pragmas
2024-09-20 12:47:44 +02:00
Paolo Tranquilli
8d291ab938
Codegen: move qltest.test_with to parametrized pragmas
2024-09-20 12:47:44 +02:00
Paolo Tranquilli
db00cb6827
Codegen: move class synth decorators to pragmas
2024-09-20 11:09:22 +02:00
Paolo Tranquilli
70997e8189
Codegen: move default_doc_name to parametrized pragma
2024-09-20 11:09:21 +02:00
Paolo Tranquilli
9f1d50ebd1
Codegen: allow parametrized pragmas
2024-09-20 11:09:21 +02:00
Paolo Tranquilli
74c0fa7154
Codegen: allow annotations to add class decorations
2024-09-20 08:40:34 +02:00
Paolo Tranquilli
cc5882a3c3
Codegen: allow full annotation of classes
2024-09-20 06:55:17 +02:00
Paolo Tranquilli
97cca76970
Revert "Codegen: allow to include .py files in schema.py"
2024-09-19 16:58:20 +02:00
Arthur Baars
f38f818578
Merge pull request #17516 from github/redsun82/codegen-annotate
...
Codegen: allow to attach docstrings after the definition
2024-09-19 15:35:16 +02:00
Paolo Tranquilli
c117a53fb0
Codegen: allow to attach docstrings after the definition
2024-09-19 12:43:34 +02:00
Paolo Tranquilli
ec9bb1da56
Codegen: allow to include .py files in schema.py
2024-09-19 12:18:52 +02:00
Tom Hvitved
1433363523
Codegen: Create internal folders
2024-09-17 20:06:35 +02:00
Tom Hvitved
9c0cafeeb8
Codegen: Make public AST classes final
2024-09-16 13:39:53 +02:00
Paolo Tranquilli
2d34fec0a2
Codegen: remove unneeded has_description property
2023-11-24 06:56:55 +01:00
Paolo Tranquilli
9264b2a6d6
Codegen: add internal to properties, rename ql_internal->internal
2023-11-24 06:56:55 +01:00
Paolo Tranquilli
f5633be837
Codegen: rename has_doc to has_qldoc
2023-11-22 10:19:36 +01:00
Paolo Tranquilli
30161b0f12
Codegen: patch customized stubs with QLdoc
2023-11-21 17:51:27 +01:00
Paolo Tranquilli
d659709695
Codegen: add render_str
2023-11-21 17:28:12 +01:00
Paolo Tranquilli
b7543f5dc7
Codegen: pass ql_internal to Stub
2023-11-08 09:54:21 +01:00
Paolo Tranquilli
7cc20587ad
Codegen: add @qltest.test_with
...
This allows to group together related AST classes to reuse the same
test source and extraction. For example this is useful for
`EnumDecl/EnumCaseDecl/EnumElementDecl`, where this is applied to.
2023-10-23 14:51:22 +02:00
Paolo Tranquilli
700e3d5e53
Codegen: rename ipa to synth
2023-06-07 09:12:39 +02:00
Nora Dimitrijević
2529312d1d
Codegen: fix test.qlgen failure
2023-06-06 15:58:19 +02:00
Nora Dimitrijević
928da77d10
Merge branch 'main' into redsun82/swift-synth-properties
2023-06-06 15:34:02 +02:00
Paolo Tranquilli
cc271d682e
Codegen: ignore synth properties in cppgen
2023-05-25 16:05:25 +02:00
Paolo Tranquilli
00fb796f3b
Codegen: ignore synth properties in dbschemegen
2023-05-25 16:05:12 +02:00
Paolo Tranquilli
d2c9847a79
Codegen: parse synth property modifier
2023-05-25 16:05:12 +02:00
Paolo Tranquilli
165ac3eeaa
Codegen: define and propagate synth property flag
2023-05-25 16:05:12 +02:00
Paolo Tranquilli
242d263e8a
Codegen: move ipa info from ql.Class to ql.Property
2023-05-25 16:05:11 +02:00
Paolo Tranquilli
b4edc92079
Swift: make hideability spread upward in the hierarchy
2023-05-23 12:45:18 +02:00
Paolo Tranquilli
a087fef335
Swift: implement @ql.hideable
2023-05-23 12:45:18 +02:00
Paolo Tranquilli
7dd18ff801
Swift: add @ql.hideable to schema loading
2023-05-23 12:45:18 +02:00
Paolo Tranquilli
95248d17d1
Codegen: prepend .gitattributes entries with /
2023-05-05 10:08:44 +02:00
Paolo Tranquilli
436f2437ef
Codegen: also mark generated .gitattributes as linguist-generated
2023-05-05 09:59:44 +02:00
Paolo Tranquilli
1155b97232
Codegen: mark generated checked in files as such
2023-05-05 09:29:16 +02:00