在裤子buildtool中,'高级'选项和常规选项有什么区别?

时间:2015-04-03 13:25:28

标签: python pants

当你运行没有选项的./pants时,你会得到帮助:

$ ./pants help
Pants 0.0.32 https://pypi.python.org/pypi/pantsbuild.pants/0.0.32

Usage:
  ./pants [option ...] [goal ...] [target...]  Attempt the specified goals.
  ./pants help                                 Get help.
  ./pants help [goal]                          Get help for a goal.
  ./pants help-advanced [goal]                 Get help for a goal's advanced options.
  ./pants help-all                             Get help for all goals.
  ./pants goals                                List all installed goals.

我注意到你也可以用--help-advanced标志看到它们。

为什么其中一些如下标有“(高级)'?

(ADVANCED)
--pants-bootstrapdir <dir>
                        Use this dir for global cache. (default:
                        /Users/zundel/.cache/pants)
(ADVANCED)
--pants-configdir <dir>
                        Use this dir for global config files. (default:
                        /Users/zundel/.config/pants)

1 个答案:

答案 0 :(得分:3)

高级选项不适用于命令行,因此通常不会在传统(-h, - help)命令行帮助中显示。如果这些选项需要与裤子标准默认值不同,则可以使用该repo的pants.ini配置文件中的裤子为存储库全局设置这些选项。在命令行上显示帮助pants.ini的这些选项的事实肯定是奇怪的,在某种意义上说,它提供了为这些选项提供文档的便利。

因此,对于一个拥有一个或两个用户的小型回购,“高级”可能比许多开发人员使用的大型回购更加用词不当。在小案例中,可能两个开发者都需要在回购中使用裤子的过程中设置或调整他们的回购pants.ini。在许多开发人员的大型回购案例中,很少有开发人员会调整pants.ini,因此对于那种回购中的普通裤子用户而言,这些选项确实是“先进的”,几乎从未有用。

相关问题