You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #65, there's another scenario where command-line params do not correctly override config. I originally reported this as though it was a problem in qmk (qmk/qmk_firmware#17624) but I think the problem may be inside milc.
Test program (hello_milc.py)
frommilcimportcliimportmilc.subcommand.configimportpprint@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs; 0 means unlimited.")@cli.entrypoint('configuration and args')defmain(cli):
print(f"jobs info: {cli.args.parallel=}{cli.config.general.parallel=}")
pprint.pprint(cli.config_source)
if__name__=='__main__':
cli()
Out of all the various ways to specify the parallel value, -jN still doesn't work. -j N, --parallel N and --parallel=N all work.
jepler@bert:~$ python3 hello_milc.py config general.parallel=3
general.parallel: 1 -> 3
ℹ Wrote configuration to /home/jepler/.config/hello_milc/hello_milc.ini
jepler@bert:~$ python3 hello_milc.py -j 5
jobs info: cli.args.parallel=5 cli.config.general.parallel=5
{'general': {'parallel': 'argument'}}
jepler@bert:~$ python3 hello_milc.py -j5
jobs info: cli.args.parallel=5 cli.config.general.parallel=3
{'general': {'parallel': 'config_file'}}
The text was updated successfully, but these errors were encountered:
jepler
added a commit
to jepler/milc
that referenced
this issue
Jul 11, 2022
this particular approach leads to some confusing results if you try to combine short style flags in other ways, EG using -sv instead of -s -v. I don't remember all the details now, but last I looked into it the basic problem is that I can't get the necessary information from argparse to unambiguously parse these types of flags consistently with how argparse does it.
Similar to #65, there's another scenario where command-line params do not correctly override config. I originally reported this as though it was a problem in qmk (qmk/qmk_firmware#17624) but I think the problem may be inside milc.
Test program (hello_milc.py)
Out of all the various ways to specify the
parallel
value,-jN
still doesn't work.-j N
,--parallel N
and--parallel=N
all work.The text was updated successfully, but these errors were encountered: