Add a minimal alternative to `cargo graph`
I tried `cargo graph` and some of its successors, but didn’t manage to make them produce what I wanted (or in some cases make them work at all.)
This Python script reimplements similar functionality based on parsing the (JSON) output of `cargo metadata`.
Graphviz graphs can become hard to read very quickly as the number of nodes grows. Servo’s dependency graph is very large, so pruning as much as possible is important. This only shows `path` dependencies (that have their source in this repo), and can take a parameter to only show recursive dependencies of a given crate.
See https://github.com/servo/servo/issues/19422#issuecomment-617038366 for an example.
I find that `xdot` is best for visualization since it is interactive.
This script is not used by anything. I am making this PR only so that we have it somewhere in case it becomes useful again at some point.
I tried `cargo graph` and some of its successors,
but didn’t manage to make them produce what I wanted
(or in some cases make them work at all.)
This Python script reimplements similar functionality
based on parsing the (JSON) output of `cargo metadata`.
Graphviz graphs can become hard to read very quickly as the number of nodes grows.
Servo’s dependency graph is very large, so pruning as much as possible is important.
This only shows `path` dependencies (that have their source in this repo),
and can take a parameter to only show recursive dependencies of a given crate.
See https://github.com/servo/servo/issues/19422#issuecomment-617038366 for an example.
I find that `xdot` is best for visualization since it is interactive.
This script is not used by anything.
I am making this PR only so that we have it somewhere
in case it becomes useful again at some point.
Only enable RUST_BACKTRACE in non-mac build environment on CI.
This should help work around #26192 and would explain why we're still seeing it on CI after #26217.
Use python binary to run multiprocess tests.
The python2 binary doesn't exist in the path on macOS. This change uses an existing python2 on macOS and whatever the default python version is on linux.
Make the rule tree actually threadsafe
RuleTree::gc is now a safe method that any thread can call
at any time, and StrongRuleNode values can all be dropped
whenever their owner want to, on any thread.
RuleTree::gc is now a safe method that any thread can call
at any time, and StrongRuleNode values can all be dropped
whenever their owner want to, on any thread.
[python/servo/bootstrap.py] Add missing comma
<!-- Please describe your changes on the following line: -->
Add a missing comma in `pkgs_dnf` list, so `python3 ./mach bootstrap` works on Fedora.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
Unfortunately I can't actually build Servo right now because of lack of RAM (whoops), but hopefully adding a single comma between elements of a list is small enough of a change for you to overlook that. 😅
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] (N/A) These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's in the bootstrap script, which afaik doesn't have tests.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->