that........or we have an options parsing bug, hop...
# general
a
that........or we have an options parsing bug, hope not
f
Thanks for your help! No dice on version 1.14 with
Copy code
[repl.repl.py]
ipython = True
Copy code
➜  infra git:(master) ✗ ./pants repl -ldebug test/testing_utils 
DEBUG] Target alias resources has already been registered. Overwriting!
ERROR] Invalid scope [repl.repl.py] in /home/dfeld/infra/pants.ini
timestamp: 2019-04-10T19:09:16.641146
Exception caught: (pants.option.config.ConfigValidationError) (backtrace omitted)
Exception message: Invalid config entries detected. See log for details on which entries to update or remove.
(Specify --no-verify-config to disable this check.)
Seems like an invalid config.
a
...........we may have an options parsing bug
f
oh no
a
--repl-repl-py-ipython
also fails
it's ok it's our fault
f
should I bump pants version?
a
which version are you on?
f
14
1.14
a
i think i repro on master
f
Ahhh ok great & or terrible. Happy to open a git issue to save you the time
a
could you let me know the output of
./pants options | grep ipython
?
f
Copy code
➜  infra git:(master) ✗ ./pants options | grep ipytho
repl.py.ipython = True (from CONFIG in pants.ini)
repl.py.ipython_entry_point = IPython:start_ipython (from HARDCODED)
repl.py.ipython_requirements = ['ipython==1.0.0'] (from HARDCODED)

➜  infra git:(master) ✗
a
and you're saying it doesn't work unless provided on the command line
f
Hang on, reversing all the changes
a
if you could make an issue at https://github.com/pantsbuild/pants/issues/new with essentially the text of your first message as well as the command outputs you've provided in this thread that would be wonderful
f
Bizarre, after ctrl-z ing it is now working as intended.
a
ok, so with:
Copy code
[repl.py]
ipython = True
you are successfully dropping into ipython?
f
it's dumping into a ipython repl by default now with that correct. ini:
Copy code
[GLOBAL]
pants_version: 1.14.0

[repl.py]
ipython = True

backend_packages: [
    # Pants built-ins:
    'pants.backend.graph_info',
    'pants.backend.python',
  ]
a
ok wonderful
f
Although of how that didn't work before - i did do a clean in the last 5 mins but i doubt that would have effected it! And was playing around w/ repl for like an hour before diving in onto slack....
a
(although
backend_packages
i thought was a global option? i don't understand .ini files enough, lol)
yes well there's at least one bug which is that
./pants repl --repl-py-ipython
is accepted, because that should error
you may have been running into that or another bug in options parsing
i can't think of any known issues right now that might cause it to do that
h
Hm yes I would expect you to need to put
backend_packages
under the
[GLOBAL]
section, not
[repl.py]
☝️ 1
a
if this occurs again, please message the channel and we can work it out
f
you're saying
-repl-py-ipython
should be an error?
and oops on the ini ordering!
a
well, that should work, but
./pants repl --repl-py-ipython
should fail, because that should be converted to
./pants --repl-repl-py-ipython repl
, which doesn't exist. but it looks like that's orthogonal to your issue
i just wanted to bring it up since the reason for your original issue is still mysterious
f
totally.
cool, I'll open an issue for that when i get back from lunch, really appreciate the help!
a
no worries, i can actually open the issue for the repl cli options weirdness! it's not clear if it's a bug or if i'm misunderstanding pants is why lol
f
works for me haha, im only 2 days into my pants journey so maybe we're both misunderstanding. I had a very hard time converting one single python library to a pants library, trying to think of ways to improve the docs to unstuck future devs... unrelated tho!
❤️ 2
a
we would be extremely delighted if you were to do something like that
please let us know if we can help
f
I'll write something up - going to need the rest of my team to follow this future doc anyways to migrate our many libraries to pants if we stay on the pants train! Perhaps it can go under https://www.pantsbuild.org/common_tasks.html as "Migrating a Python PyPi package to a Pants Library"
❤️ 1
h
That’d be great! Thank you
w
ini syntax is
:
not
=
... not sure whether that's relevant here though
h
Ini allows either
:
or
=
! We just standardize to
:
in docs.
w
oook
f
What would the best channel/place be to continue discussion of the new doc or modifications? Due to my relative newbiness on the pants side, I'm not sure the vocabulary i'm using maps to the jargon in pants. Does opening a PR with a work-in-progress migration_from_pypi.md sound like a good way to get started?
👍 1
h
That’d be great! Please mark the PR as a draft PR to avoid CI running every time. You can also message me and @aloof-angle-91616 at any time to talk things over.
👍 1
l
FWIW, on my 3-4 old Pants deploy we have
Copy code
[repl.py]
ipython_requirements: ['ipython==5.0.0']
ipython: True
Gonna repost that working snippet to channel
Copy code
[repl.py]
ipython_requirements: ['ipython==5.0.0']
ipython: True
☝️ 2
💯 1