Skip to content
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

Tailor creates invalid BUILD file for python_requirements #14061

Closed
kaos opened this issue Jan 4, 2022 · 1 comment · Fixed by #14065
Closed

Tailor creates invalid BUILD file for python_requirements #14061

kaos opened this issue Jan 4, 2022 · 1 comment · Fixed by #14065
Assignees
Labels

Comments

@kaos
Copy link
Member

kaos commented Jan 4, 2022

Describe the bug

$ ./pants tailor
Created 3rdparty/BUILD:
  - Add macro python_requirements
$ ./pants run src/pr:main
11:31:40.88 [ERROR] 1 Exception encountered:

  MappingError: Failed to parse ./3rdparty/BUILD:
__call__() got an unexpected keyword argument 'name'

$ tree
.
├── 3rdparty
│   ├── BUILD
│   └── requirements.txt
├── README.md
├── pants
├── pants.toml
└── src
    └── pr
        ├── BUILD
        └── main.py

3 directories, 9 files
$ cat 3rdparty/BUILD 
python_requirements(
    name="requirements.txt",
)

Pants version
2.9.0rc2

OS
Mac

Additional info

# pants.toml
[GLOBAL]
pants_version = "2.9.0rc2"
backend_packages = [
  "pants.backend.python",
  "pants.backend.experimental.python.lint.autoflake",
  "pants.backend.python.lint.black",
  "pants.backend.python.lint.docformatter",
  "pants.backend.python.lint.flake8",
  "pants.backend.python.lint.isort",
  "pants.backend.python.typecheck.mypy",
]


[anonymous-telemetry]
enabled = true
repo_id = "xx"
@kaos kaos added the bug label Jan 4, 2022
@kaos
Copy link
Member Author

kaos commented Jan 4, 2022

For the record. Changing name="requirements.txt" to source="requirements.txt" solves it.

@Eric-Arellano Eric-Arellano self-assigned this Jan 4, 2022
Eric-Arellano added a commit that referenced this issue Jan 4, 2022
Closes #14061. Oopsies.

Note that this code path will be removed soon once we finish #12915.

[ci skip-rust]
Eric-Arellano added a commit to Eric-Arellano/pants that referenced this issue Jan 4, 2022
…uild#14065)

Closes pantsbuild#14061. Oopsies.

Note that this code path will be removed soon once we finish pantsbuild#12915.

[ci skip-rust]
Eric-Arellano added a commit that referenced this issue Jan 4, 2022
…-pick of #14065) (#14067)

Closes #14061. Oopsies.

Note that this code path will be removed soon once we finish #12915.

[ci skip-rust]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants