Skip to content

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Oct 23, 2023

Part split out from #36443 that does not conflict with #36510:

  • Update to today's latest pyright version
  • node.js, as provisioned via https://pypi.org/project/pyright/, no longer accepts a preinstalled node version.
  • node.js is configured to provide sufficient heap size. This reduces the runtime dramatically as pyright no longer has to fight with the garbage collector and eliminates spurious out of memory conditions. (Same change for the CI "Build & Test" is made also in Add pyright ci annotations #36510.)
  • Like the pyright invocation by the CI "Build & Test", it now runs on the entire source tree.
  • It no longer assumes that the Sage library has been built (and no longer uses the Sage venv). It installs the runtime dependencies from the SAGE_SPKG_WHEELS in an isolated tox environment.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@@ -22,4 +22,5 @@
"reportUndefinedVariable": "warning",
"reportOptionalOperand": "warning",
"reportMissingImports": "warning",
"reportSelfClsParameterName": "none",
Copy link
Contributor

@tobiasdiez tobiasdiez Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the problem with this check? (I know you had a comment here before explaining it, but even then I didn't understand it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I lost the commit with the comment, I'll find it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is back and does not need further clarification

@vbraun vbraun force-pushed the develop branch 2 times, most recently from 883e05f to e349b00 Compare November 12, 2023 16:25
@kwankyu
Copy link
Collaborator

kwankyu commented Nov 16, 2023

I get

$ sage -tox -e pyright
pyright: install_deps /Users/kwankyu/GitHub/sage-dev/src> python -I -m pip install pyright -e /Users/kwankyu/GitHub/sage-dev/pkgs/sage-conf -r /Users/kwankyu/GitHub/sage-dev/src/requirements.txt
Looking in links: file:///Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11/var/lib/sage/wheels
Obtaining file:///Users/kwankyu/GitHub/sage-dev/pkgs/sage-conf
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Ignoring pycygwin: markers 'sys_platform == "cygwin"' don't match your environment
Collecting pyright
  Using cached pyright-1.1.336-py3-none-any.whl.metadata (5.7 kB)
ERROR: Could not find a version that satisfies the requirement cypari2==2.1.4 (from versions: 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.3)
ERROR: No matching distribution found for cypari2==2.1.4

pyright: exit 1 (4.65 seconds) /Users/kwankyu/GitHub/sage-dev/src> python -I -m pip install pyright -e /Users/kwankyu/GitHub/sage-dev/pkgs/sage-conf -r /Users/kwankyu/GitHub/sage-dev/src/requirements.txt pid=61859
  pyright: FAIL code 1 (4.73 seconds)
  evaluation failed :( (4.83 seconds)

@kwankyu
Copy link
Collaborator

kwankyu commented Nov 16, 2023

Sorry, but the latest version is now 1.1.336...

Copy link

Documentation preview for this PR (built with commit abae734; changes) is ready! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants