lemon-oxygen-72498
11/15/2022, 9:08 AMpyright
! I'm coming with an additional request 😉 I've tried pinning `pyright`'s version as follows in `pants.toml`:
[pyright]
version = "pyright==1.1.258"
lockfile = "pants_dir/3rdparty/pyright_lockfile.lock"
But this isn't recognized:
→ PANTS_SHA=11b4fd412631c6315b474e49fe482dec1767cf29 ./pants check libs/geometry::
...
10:00:25.71 [ERROR] Invalid option 'lockfile' under [pyright] in /home/churlin/dev/kaiko-eng/pants.toml
10:00:25.71 [ERROR] Invalid option 'version' under [pyright] in /home/churlin/dev/kaiko-eng/pants.toml
10:00:25.71 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.
Am I doing something wrong or is the locking support missing? I need it because right now pants
pulls a different version of pyright
than my regular CI and I get discrepancies 😕 I can create an issue if that would help you, let me know.wide-midnight-78598
11/15/2022, 1:18 PMSubsystem
does not specify a version. In most Python tools, that comes with PythonToolRequirementsBase
I think we'll need a NodeToolBase
, to match PythonToolBase
Kinda makes me wish we had a more composable infra, in lieu of subclassing as muchpyright
subsystem, I think
version = StrOption(
advanced=True,
default=lambda cls: cls.default_version,
help="Requirement string for the tool.",
)
and then setting:
default_version
to version
process = await Get(
Process,
NpxProcess(
npm_package=pyright.default_version,
However, a more "correct" solution would be to apply some default Npx/Npm base subsystem which has some standard defaults setup, or maybe even a mixin.lemon-oxygen-72498
11/16/2022, 10:46 AMwide-midnight-78598
11/18/2022, 2:53 AMPANTS_SHA=800d4bc94b38f6cea3b30b247c1d90186af8b426 ./pants --pyright-version=pyright@1.1.257 help-advanced pyright
`pyright` subsystem advanced options
------------------------------------
--pyright-version=<str>
PANTS_PYRIGHT_VERSION
version
default: pyright@1.1.274
current value: pyright@1.1.257 (from command-line flag)
overrode: pyright@1.1.258 (from pants.toml)
Version string for the tool in the form package@version (e.g. prettier@2.6.2)