https://pantsbuild.org/ logo
#general
Title
# general
h

hundreds-father-404

12/21/2021, 11:40 PM
A poll: which do people prefer for the default "resolve" and lockfile for your Python code? A "resolve" is a logical name for a lockfile, and it's what will allow multiple lockfiles in your project. If you want some code to use a different lockfile than the default, you'll set
resolve="data_science"
for example. A. Abbreviate for less verbosity:
{"py-default": "3rdparty/py/default_lock.txt"}
B. Use full name for clarity:
{"python-default": "3rdparty/python/default_lock.txt"}
🅰️ 1
🅱️ 5
You can override what this default is, of course
This will create an actual lockfile at the specified path A related question is whether people prefer
src/py
or
src/python
?
e

enough-analyst-54434

12/21/2021, 11:44 PM
Is there a principle implied or is this random? Would java be java-default (with no degrees of freedom) and rust be - like python - rs-default or rust-default (bad example but hopefully underscores the point).
1
h

hundreds-father-404

12/21/2021, 11:45 PM
Java and Scala is currently
jvm-default
, so no precedent is currently set
e

enough-analyst-54434

12/21/2021, 11:46 PM
You're missing my point.
Is the idea we use source file extensions vs words?
It would be great not to be random.
Every decision like this is horrible to have to make. The less the better.
h

hundreds-father-404

12/21/2021, 11:49 PM
Oh I think the idea is more "accepted abbreviations for the language when the language name is long". If there is no abbrevation (Scala and Java), there's no decision I'd think Rust should be
rust-default
because it doesn't seem like RS is used as an abbreviation, only the file extension
e

enough-analyst-54434

12/21/2021, 11:51 PM
Hrm, ok. That feels random to me. I'd personally like to know python is python and I need never look up docs to know what to expect for various pants names.
h

hundreds-father-404

12/21/2021, 11:51 PM
Would Go be
go-default
or
golang-default
, for example? (Probably a bad example, Go has its own lockfile semantics and it's not clear we'll hook it into this generic resolves infrastructure https://github.com/pantsbuild/pants/issues/13114)
That feels random to me.
Sure, definitely some level of arbitrary here. Just like it was somewhat arbitrary for us to use
jvm/default.lock
vs
jvm/default.lockfile
vs
jvm/artifacts.lock
etc
e

enough-analyst-54434

12/21/2021, 11:53 PM
I guess my thrust is entertaining opinion on something like this feels like entertaining randomness. A principle would be great. Go, Python, Rust, the JVM (class files) - these are all discoverable names. Golang is just a conceit because people are bad at searching / it's so overloaded in regular speech.
👍 1
I'm totally on board with entertaining opinion on a principle though, then locking that in and advertising it. Pants then becomes sane to grok more comprehensively more easily unlike something unprincipled with lots of accreted unprincipled opinuon, like, say English.
👍 1
p

proud-dentist-22844

12/22/2021, 1:15 AM
aside: English has to be one of the worst languages... even if it's my native language I don't like how unpredictable it is. Portuguese is much better imo (the only other spoken language I know well).
1
For predictability I vote B
👍 1
5 Views