Skip to content

Rust: regenerate MaD files using DCA #19674

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

Merged
merged 19 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions cpp/misc/bulk_generation_targets.json

This file was deleted.

10 changes: 10 additions & 0 deletions cpp/misc/bulk_generation_targets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: cpp
strategy: dca
destination: cpp/ql/lib/ext/generated
targets:
- name: openssl
with-sinks: false
with-sources: false
- name: sqlite
with-sinks: false
with-sources: false
13 changes: 9 additions & 4 deletions misc/scripts/models-as-data/bulk_generate_mad.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
import requests
import zipfile
import tarfile
from functools import cmp_to_key

try:
import yaml
except ImportError:
print("ERROR: PyYAML is not installed. Please install it with 'pip install pyyaml'.")
sys.exit(1)

import generate_mad as mad

Expand Down Expand Up @@ -492,9 +497,9 @@ def main(config, args) -> None:
sys.exit(1)
try:
with open(args.config, "r") as f:
config = json.load(f)
except json.JSONDecodeError as e:
print(f"ERROR: Failed to parse JSON file {args.config}: {e}")
config = yaml.safe_load(f)
except yaml.YAMLError as e:
print(f"ERROR: Failed to parse YAML file {args.config}: {e}")
sys.exit(1)

main(config, args)
75 changes: 0 additions & 75 deletions rust/misc/bulk_generation_targets.json

This file was deleted.

45 changes: 45 additions & 0 deletions rust/misc/bulk_generation_targets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
strategy: repo
language: rust
destination: rust/ql/lib/ext/generated
extractor_options:
- cargo_features='*'
targets:
- git_repo: https://github.com/rust-lang/libc
git_tag: 0.2.172
name: libc
- git_repo: https://github.com/rust-lang/log
git_tag: 0.4.27
name: log
- git_repo: https://github.com/BurntSushi/memchr
git_tag: 2.7.4
name: memchr
- git_repo: https://github.com/matklad/once_cell
git_tag: v1.21.3
name: once_cell
- git_repo: https://github.com/rust-random/rand
git_tag: 0.9.1
name: rand
- git_repo: https://github.com/servo/rust-smallvec
git_tag: v1.15.0
name: smallvec
- git_repo: https://github.com/serde-rs/serde
git_tag: v1.0.219
name: serde
- git_repo: https://github.com/tokio-rs/tokio
git_tag: tokio-1.45.0
name: tokio
- git_repo: https://github.com/seanmonstar/reqwest
git_tag: v0.12.15
name: reqwest
- git_repo: https://github.com/SergioBenitez/Rocket
git_tag: v0.5.1
name: rocket
- git_repo: https://github.com/actix/actix-web
git_tag: web-v4.11.0
name: actix-web
- git_repo: https://github.com/hyperium/hyper
git_tag: v1.6.0
name: hyper
- git_repo: https://github.com/clap-rs/clap
git_tag: v4.5.38
name: clap