before I raise a PR to extend our docs, just to co...
# plugins
f
before I raise a PR to extend our docs, just to confirm - I've just noticed that one cannot have options in the plugins which have their name starting with a word that represents an existing goal, as Pants thinks you are adding flags in that goal's scope ๐Ÿงต
With
Copy code
run_bar = BoolOption(
        default=False,
        help="Run bar.",
    )
Copy code
$ ./pants dummy --run-bar myapp:   
Unknown flag --bar on run scope
Did you mean --args?
Use `./pants help run` to get help.
[ERROR] Unknown flags --bar on scope run

$ ./pants dummy --dummy-run-bar myapp:
[INFO] Completed.
As the number of goal increases (and there may be custom goals with in-repo plugins), perhaps worth adding a paragraph about it. I think it's super common to have custom options named
--check-foo
๐Ÿ™‚
b
I think we need better namespacing and scoping of thing in Pants IMHO
This particular problem will likely persist though ๐Ÿ˜›
f
alrighty then, raising a PR then ๐Ÿ˜›
h
That is correct, but I would love to fix it
because you can introduce a custom goal name and break existing options
f
because you can introduce a custom goal name and break existing options
oh that's a great point. I've added an issue to track and raised a PR to document this peculiarity. See https://github.com/pantsbuild/pants/pull/17899 and https://github.com/pantsbuild/pants/issues/17900