gpo.zugaina.org

Search Portage & Overlays:

dev-util/basedpyright

Pyright fork with various type checking improvements and Pylance features

Screenshots

  • basedpyright-1.40.1
    ~amd64 ~arm64

    View      Download      Browse     License: MIT Apache-2.0 BSD BSD-2 ISC 0BSD   
    Overlay: bentoo

ChangeLog

commit 354ae33dd72264e4e875d7af5f2809af00012c34
Author: lucascouts <lucascs@protonmail.com>
Date: Mon Sep 28 17:09:27 2026 -0300

dev-util/{typescript-language-server,basedpyright}: private TypeScript 6

dev-lang/typescript-7.0.2 (the native Go port) now sits in slot 0 next
to ::gentoo's 6.x, and typescript-language-server-6.0.1-r1 pinned
<dev-lang/typescript-7 because 7.x has no tsserver.js. Same slot means
one or the other: on a ~amd64 system, the upgrade to 7.0.2 hit a slot
conflict against the installed server, and basedpyright's
BDEPEND="=dev-lang/typescript-6.0*" had the same latent problem.

Both now carry their own copy of typescript-6.0.3 (the last JavaScript
release, Apache-2.0, no dependencies) as an extra distfile:

- typescript-language-server-6.0.1-r2 installs its lib/ under
/usr/share/typescript-language-server/node_modules/typescript, where
the server's require.resolve('typescript') fallback already looked;
the dev-lang/typescript dependency is gone.
- basedpyright compiles with that tsc (node .../bin/tsc); BDEPEND drops
to net-libs/nodejs. The installed files are unchanged, so no revbump.

Verified: pkgcheck clean on both; ebuild clean install (unprivileged),
no QA notice; the server from the image reports
$/typescriptVersion 6.0.3 "bundled" on a JS project with no typescript
and answers hover; basedpyright from the image reports 1.40.1.
emerge -pv =dev-lang/typescript-7.0.2 + both packages now resolves
without a conflict. Not covered: a real merge into /.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

commit 335ddf7d501e9568c3547be1a9c30599ea10e265
Author: lucascouts <lucascs@protonmail.com>
Date: Mon Sep 28 17:02:28 2026 -0300

dev-util/basedpyright: new package, add 1.40.1, built without core-js

Upstream's npm bundle carries @core-js/pure 4.0.0-alpha.1 inside the
language server. That alpha's licence is non-commercial, experimental
only and expires with core-js 4 stable, so the bundle is not installed
as is. Instead:

- files/basedpyright-drop-core-js.patch replaces the four polyfills it
provided (Array at/toSpliced, the Set with union()) by the native
methods of Node.js >= 22, and points tsconfig at the matching libs;
- the sources are compiled with dev-lang/typescript (tsc, pure JS)
rather than upstream's rspack, which needs per-arch native binaries;
- node_modules comes from an overlay-hosted tarball pinned to upstream's
pnpm-lock.yaml, with no core-js in it; uploaded and checked by GET;
- only dist/typeshed-fallback (the .pyi docstubs) is taken from the npm
tarball, as data.

The basedpyright entry in not-packageable.md is removed.

Verified: pkgcheck; ebuild clean install (unprivileged), no QA notice;
no core-js reference left in the image. From the image: --version
reports basedpyright 1.40.1 / pyright 1.1.414; checking the stdlib json
package gives diagnostics identical to the official npm build (6 files,
5 errors, 663 warnings); the language server answers initialize, hover
(with stdlib docstrings), and a completion that goes through the patched
Set.union path. Not covered: upstream's jest suite (RESTRICT=test),
arm64, a real merge into /.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>