Hi everyone, I need some help setting up a new pan...
# general
f
Hi everyone, I need some help setting up a new pants project. I have followed the documentation but keep encountering this error:
Copy code
$ pants tailor ::
Failed to fetch <https://binaries.pantsbuild.org/tags/pantsbuild.pants/release_2.16>: [22] HTTP response code said error (The requested URL returned error: 404)
Install failed: list indices must be integers or slices, not str
More information can be found in the log at: /Users/xxx/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/bindings/logs/configure.log

Error: Failed to establish atomic directory /Users/xxx/Library/Caches/nce/cf6c1988edaa5d40bbf385ae79a75e6d2abba937217d1b672c71eaf0ea495bcd/locks/configure-e319402acb9ab1284904d24db6ac2b1eca256b0be3313013dafa16b47301b665. Population of work directory failed: Boot binding command failed: exit status: 1
below is my
pants.toml
Copy code
[GLOBAL]
 pants_version = "2.16"

 backend_packages = [
   "pants.backend.python",
   "pants.backend.python.lint.black",
 ]
I am using an M2 chip MacBook Air. I would appreciate any help with this issue. Thank you!
βœ… 1
b
have you installed the pants launcher?
f
I do. I use brew install. Below is the messages I got.
Copy code
==> Installing Cask pants
==> Linking Binary 'scie-pants-macos-aarch64' to '/opt/homebrew/bin/pants'
🍺  pants was successfully installed!
b
hm i’m wondering if this might be a bug - checking the links that the launcher is unable to fetch returns errors as well - i checked 2.16, 2.17 and 2.18 following the URL scheme
maybe @happy-kitchen-89482 or @broad-processor-92400 might be able to assist here - if they are unable i would file a github issue
f
Thanks so much! I used Pants at my previous company, and now that I have some leisure time, I was thinking about contributing to the Pants project myself. So, I’m trying to familiarize myself more with the project, and here I am, encountering this issue. Interesting!
πŸŽ‰ 1
b
kismet πŸ™‚
πŸ˜† 1
h
@bitter-ability-32190 does anything come immediately to mind?
b
I think you need to provide a specific x.y.z version:
pants_version = β€œ2.16.0”
. The error message could definitely be improved a lot, because that is very hard to diagnose! Do you mind filing an issue on https://github.com/pantsbuild/scie-pants ? Thanks
☝️ 1
b
ah that looks right - if i try to open
<https://binaries.pantsbuild.org/tags/pantsbuild.pants/release_2.16.0>
in a browser i get a prompt to download something as opposed to an error
f
I just created this issue, and it’s my first time doing so. I’m not sure if I did it right. Please take a look!
h
Ah yes, good eye Huon - the version needs to be precise.
Thanks for the ticket @freezing-area-97131
f
My pleasure! I would like to try fixing it myself. Can you assign the issue to me?
h
That would be great! Let us know if you need any help digging into that code
f
I found out there is a similar pull request, but it has been a few months since last change.
h
Nice! I've posted there asking @rough-vase-83553 for a status update
f
Thanks! I am working on that now. Thanks for @broad-processor-92400’s review! I have a newbie question: How do you debug in Pants? Are there tools like GDB or PDB that I can make use of?
b
Are you trying to debug code that pants is running (https://www.pantsbuild.org/docs/python-test-goal#debugging-tests), pants itself (https://www.pantsbuild.org/docs/contributions-debugging), or something in scie-pants (it's a rust program that involves python programs, so might be a bit hard to debug, depending on which part you're looking at) ?
f
I see. Then how do I run specific test I just wrote under
scie-pants/package/src/test.rs
?
b
Yeah, those are a bit awkward. I usually comment out all the other tests temporarily. Not the best, but it works okay
πŸ˜† 1
f
I seeπŸ˜… Same here