aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/depfile.py
AgeCommit message (Collapse)AuthorFilesLines
2023-02-01treewide: add future annotations importEli Schwartz1-0/+1
2022-11-30pylint: enable the set_membership pluginDylan Baker1-1/+1
Which adds the `use-set-for-membership` check. It's generally faster in python to use a set with the `in` keyword, because it's a hash check instead of a linear walk, this is especially true with strings, where it's actually O(n^2), one loop over the container, and an inner loop of the strings (as string comparison works by checking that `a[n] == b[n]`, in a loop). Also, I'm tired of complaining about this in reviews, let the tools do it for me :)
2022-09-19pylint: enable consider-using-inDylan Baker1-1/+1
2022-01-10depfile: type annotateDylan Baker1-15/+20
2020-11-15stabilize sets that are converted to listsPaolo Bonzini1-1/+1
The order of elements in sets cannot be relied upon, because the hash values are randomized by Python. Whenever sets are converted to lists we need to keep their order stable, or random changes in the command line cause ninja to rebuild a lot of files unnecessarily. To stabilize them, use either sort or OrderedSet. Sorting is not always applicable, but it can be faster because it's done in C and it can produce slightly nicer output.
2019-09-30Add depfile to configure_file()Marc-André Lureau1-0/+85
In qemu, minikconf generates a depfile that meson could use to automatically reconfigure on dependency change. Note: someone clever can perhaps find a way to express this with a ninja rule & depfile=. I didn't manage, so I wrote a simple depfile parser.