curved-television-6568
01/12/2022, 5:46 PM--changed-since
with generated targets, due to there being “too many” targets affected from a single source file, I’m playing with the idea to track the source lines of targets, so we can get more granular filtering for these targets. 🧵curved-television-6568
01/12/2022, 5:47 PM$ ./pants peek src/python/pants/bin:bin
18:44:35.91 [INFO] Initializing scheduler...
18:44:43.22 [INFO] Scheduler initialized.
[
{
"address": "src/python/pants/bin:bin",
"target_type": "python_sources",
"definition_location": {
"path": "src/python/pants/bin/BUILD",
"start_line": 2,
"end_line": 5
},
"dependencies": [
...
The definition location here is hardcoded in the BUILD file parser only, then that is passed on all the way to peek via a `Target`…curved-television-6568
01/12/2022, 5:47 PMcurved-television-6568
01/12/2022, 5:48 PMenough-analyst-54434
01/12/2022, 6:41 PMcurved-television-6568
01/12/2022, 7:20 PM--changed-since
(from my perspective) is to exclude targets from an operation, regardless of whether there exists a prior cached result or not.
Say I want to package (and publish) all dists that have changed since a previous commit. With a single requirements.txt
file, that would be all dists that use any dep from those requirements, which is wrong. I’d prefer if I could filter out so only those dists that actually depend on a dep that was changed in that requirments.txt
file was published.
Does that make sense?curved-television-6568
01/12/2022, 7:22 PMwitty-crayon-22786
01/12/2022, 7:28 PMcurved-television-6568
01/12/2022, 7:28 PMwitty-crayon-22786
01/12/2022, 7:28 PMwitty-crayon-22786
01/12/2022, 7:29 PMwitty-crayon-22786
01/12/2022, 7:30 PMcurved-television-6568
01/12/2022, 7:31 PMcurved-television-6568
01/12/2022, 7:31 PMpython_requirements
target..curved-television-6568
01/12/2022, 7:31 PMcurved-television-6568
01/12/2022, 7:57 PMhundreds-father-404
01/13/2022, 6:21 PMI haven’t come across using variables in BUILD files yet.Yeah, BUILD files are full-on Python. Just we ban
import
curved-television-6568
01/13/2022, 6:54 PMopen
? 🤔hundreds-father-404
01/13/2022, 6:59 PMopen
given that it will mess up caching, we scan the AST for both import
and open
curved-television-6568
01/13/2022, 7:04 PM