-
Install mise.
-
Install the correct versions of Node and Python:
mise plugin install nodejs mise plugin install python # Install appropriate Node and Python versions based on .tool-versions mise installYou may need to restart your shell for the changes to take effect.
-
Install dependencies:
# From the root of the repo npm install cd packages/pyright-scip npm install
All the other commands should be run from the packages/pyright-scip
subdirectory.
# Build in development mode once
npm run webpack
# Build in development mode, watch for changes
npm run watchTo create a release build:
npm run buildWARNING: If you create the release build and then try to run tests, you will not get useful stack traces because source maps are disabled for the release build.
All of the above methods should produce an index.js file
in packages/pyright-scip which can be invoked with Node
to index a test project.
node ./index.js <other args>
npm run check-snapshotsUse the --filter-tests flag to run only specific snapshot tests:
# Using npm scripts (note the -- to pass arguments)
npm run check-snapshots -- --filter-tests test1,test2,test3Available snapshot tests can be found in snapshots/input/.
Using a different Python version other than the one specified
in .tool-versions may also lead to errors.
To check for formatting issues:
# Check prettier formatting
npm run check:prettierTo fix formatting issues:
# Fix prettier formatting issues
npm run fix:prettierWhen modifying code in the pyright-internal package:
- Keep changes minimal: Every change introduces a risk of merge conflicts. Adding doc comments is fine, but avoid changing functionality if possible. Instead of changing access modifiers, prefer copying small functions into scip-pyright logic.
- Use a
NOTE(scip-python):prefix when adding comments to make it clearer which comments were added by upstream maintainers vs us.
- Create a PR with the following changes:
- Change the version in package.json
to
M.N.P. - Add release notes to CHANGELOG.md
- Change the version in package.json
to
- After merging the PR, add a tag
vM.N.Pto the latest commit on thescipbranch and push that tag.