facebook / facebook/buck2

aquery action attrs should be strongly typed

Open
#486 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.4k
Forks
394
PR merge metrics
No merged PRs in 30d

Description

When using aquery from bxl, and trying to get the command line args for a cxx_compile action, it’s a value like `[cl.exe, -c, foo.cpp, @argsfile, -o, foo.obj]`. Unfortunately, it’s quite literally a string, so to get it as a Starlark list you have to do the very awkward

```
cmd = cmd.strip(“[]”).split(“,”)
cmd = list(map(lambda x: x.strip(), cmd))
```

which is sure to break at the worst possible time. Is it possible to make the action_attr binding support more types than just raw strings?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.