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

aloof-angle-91616

04/10/2019, 7:09 PM
that........or we have an options parsing bug, hope not
f

faint-holiday-82821

04/10/2019, 7:10 PM
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

aloof-angle-91616

04/10/2019, 7:10 PM
...........we may have an options parsing bug
f

faint-holiday-82821

04/10/2019, 7:10 PM
oh no
a

aloof-angle-91616

04/10/2019, 7:10 PM
--repl-repl-py-ipython
also fails
it's ok it's our fault
f

faint-holiday-82821

04/10/2019, 7:10 PM
should I bump pants version?
a

aloof-angle-91616

04/10/2019, 7:10 PM
which version are you on?
f

faint-holiday-82821

04/10/2019, 7:11 PM
14
1.14
a

aloof-angle-91616

04/10/2019, 7:11 PM
i think i repro on master
f

faint-holiday-82821

04/10/2019, 7:11 PM
Ahhh ok great & or terrible. Happy to open a git issue to save you the time
a

aloof-angle-91616

04/10/2019, 7:11 PM
could you let me know the output of
./pants options | grep ipython
?
f

faint-holiday-82821

04/10/2019, 7:12 PM
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

aloof-angle-91616

04/10/2019, 7:12 PM
and you're saying it doesn't work unless provided on the command line
f

faint-holiday-82821

04/10/2019, 7:13 PM
Hang on, reversing all the changes
a

aloof-angle-91616

04/10/2019, 7:13 PM
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

faint-holiday-82821

04/10/2019, 7:14 PM
Bizarre, after ctrl-z ing it is now working as intended.
a

aloof-angle-91616

04/10/2019, 7:14 PM
ok, so with:
Copy code
[repl.py]
ipython = True
you are successfully dropping into ipython?
f

faint-holiday-82821

04/10/2019, 7:14 PM
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

aloof-angle-91616

04/10/2019, 7:14 PM
ok wonderful
f

faint-holiday-82821

04/10/2019, 7:15 PM
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

aloof-angle-91616

04/10/2019, 7:15 PM
(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

hundreds-father-404

04/10/2019, 7:16 PM
Hm yes I would expect you to need to put
backend_packages
under the
[GLOBAL]
section, not
[repl.py]
☝️ 1
a

aloof-angle-91616

04/10/2019, 7:16 PM
if this occurs again, please message the channel and we can work it out
f

faint-holiday-82821

04/10/2019, 7:17 PM
you're saying
-repl-py-ipython
should be an error?
and oops on the ini ordering!
a

aloof-angle-91616

04/10/2019, 7:18 PM
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

faint-holiday-82821

04/10/2019, 7:18 PM
totally.
cool, I'll open an issue for that when i get back from lunch, really appreciate the help!
a

aloof-angle-91616

04/10/2019, 7:19 PM
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

faint-holiday-82821

04/10/2019, 7:20 PM
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

aloof-angle-91616

04/10/2019, 7:22 PM
we would be extremely delighted if you were to do something like that
please let us know if we can help
f

faint-holiday-82821

04/10/2019, 7:25 PM
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

hundreds-father-404

04/10/2019, 7:26 PM
That’d be great! Thank you
w

witty-crayon-22786

04/10/2019, 8:10 PM
ini syntax is
:
not
=
... not sure whether that's relevant here though
h

hundreds-father-404

04/10/2019, 8:11 PM
Ini allows either
:
or
=
! We just standardize to
:
in docs.
w

witty-crayon-22786

04/10/2019, 8:13 PM
oook
f

faint-holiday-82821

04/10/2019, 9:26 PM
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

hundreds-father-404

04/10/2019, 9:40 PM
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

limited-country-20626

04/14/2019, 3:22 AM
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
5 Views