-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Changes from all commits
31d1604
900a3b0
d5c16d6
31954fa
fbd5058
4f47ee2
ee7eb86
530b990
f4bbef9
ec77eb3
6162cf5
e1eb1f6
d6d13b9
e6056f9
bcfc009
ecc35e5
ca99add
0d03699
4ac4e44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
strategy: dca | ||
language: rust | ||
destination: rust/ql/lib/ext/generated | ||
# targets must have name specified and corresponding to the name in the DCA suite | ||
# they can optionally specify any of | ||
# with-sinks: false | ||
# with-sources: false | ||
# with-summaries: false | ||
# if a target has a dependency in this same list, it should be listed after that dependency | ||
targets: | ||
- name: rust | ||
- name: libc | ||
- name: log | ||
- name: memchr | ||
- name: once_cell | ||
- name: rand | ||
- name: smallvec | ||
- name: serde | ||
- name: tokio | ||
- name: reqwest | ||
- name: rocket | ||
- name: actix-web | ||
- name: hyper | ||
- name: clap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a nice simple list, once everything is merged and stable I'll add a bunch more targets to it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one thing to keep in mind is that at the moment this list needs to be topologically ordered with respect to dependencies (so later additions should depend on earlier ones and not the other way around). Possibly worth a comment here, now that this is yaml There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, just so you know, you can tweak what gets generated with any of with-sinks: false
with-sources: false
with-summaries: false (all are true by default) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the expected use cases for those three options? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really know, but you can ask Mathias once he's back from his PTO, two of them are used for the C++ generated models There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My guess is there are certain libraries that produce a lot of inaccurate models of one type but not the others, and this gives us some additional control. @MathiasVP ? (no rush, not blocking this PR) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason is simply that C++ doesn't yet autogenerate sources and sinks (for a couple of reasons, but mainly because I didn't bother to set that properly up yet). The MaD generator script (which this script invokes under the hood) already provides these hooks to configure which kinds of models are generated, so I just lifted those hooks to this script in #19627 |
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.
[nitpick] Exiting from within a utility function (via sys.exit in on_error handlers) can make the logic harder to test or reuse; consider returning errors and handling exit at the top level instead.
Copilot uses AI. Check for mistakes.