Uh oh!
There was an error while loading. Please reload this page.
Add support to .tool-version file format - #588
Conversation
e-korolevskii
commented
Jan 18, 2023
Hello @elpic! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
elpic
commented
Jan 20, 2023
Would it be possible for you @dmitry-shibanov to run the failing tests? |
| let pythonVersion: string | undefined; | ||
| // Try to find the version in tool-version file | ||
| const found = contents.match(/^(?:python\s+)?v?(?<version>[^\s]+)$/m); |
There was a problem hiding this comment.
I think that the regular expression we used in line 34 won't work with PyPy versions correctly. In the .tool-version, PyPy format doesn't have v: python pypy3.9-3.7.11, but the action's python-versioninput should include v before the PyPy version: python pypy3.9-v3.7.11. I think we can adapt the matched version of PyPy (basically just add v before the PyPy version) and add some e2e tests both for Python and PyPy installation from .tool-version.
There was a problem hiding this comment.
From what I saw from pypy version of python in asdf-vm you have the following version
python pypy3.9-3.7.11
Is that not correct?
There was a problem hiding this comment.
It's correct version syntax for .tool-version file, but incorrect python-version syntax for setup-python. Check the supported syntax here and, please, pay attention to the letter v.
| .tool-version content | your regex result | setup-python requirement |
|---|---|---|
| python pypy3.9-3.7.11 | pypy3.9-3.7.11 | pypy3.9-v3.7.11 |
There was a problem hiding this comment.
@elpic may be could add a if/else condition here https://github.com/actions/setup-python/pull/588/files#diff-0ac8bdebd0ca13af3640499ecf1203abc825161011f13f9ca45c734bfe80128eR51 so that we parse format only for .tool-verions file
dmitry-shibanov
commented
Feb 21, 2023
Hello @elpic, just a gentle ping. |
1 similar comment
e-korolevskii
commented
Mar 14, 2023
Hello @elpic, just a gentle ping. |
elpic
commented
Mar 14, 2023
Sorry I will take a look in a moment |
plukevdh
commented
Apr 8, 2023
Any chance this gets reviewed soon? |
camflan
commented
May 19, 2023
Looks like there are a few checks failing that need addressed. @elpic any chance you have time to turn this PR green? 😅 |
Create a function to parse tool-version (asdf-vm) format, add the associated tests, and updated the documentation Ticket-ID: #571
Rollback a not abot advanced usage on how to use the file and not use the GITHUB_WORKSPACE since it was removed in a previous PR
Build the project using `npm run build` and run prettier using `npm run format`
elpic
commented
May 31, 2023
Sorry for the delay. The code is formatted now |
tanguyantoine
commented
Nov 30, 2023
@elpic this is a great improvement for this action 👏 |
tanguyantoine
commented
Jan 4, 2024
Can we get this merged? |
aiwilliams
commented
Aug 29, 2024
This would be a great addition. |
1stvamp
commented
Nov 13, 2024
Another +1 for merging this 🙏 |
edubacco
commented
Feb 12, 2025
I'd love to have this merged 🙏 |
mahabaleshwars
commented
Feb 13, 2025
Hello @elpic, |
mahabaleshwars
commented
Feb 25, 2025
Hi @elpic, |
Create a function to parse tool-version (asdf-vm) format, add the associated tests, and updated the documentation
Ticket-ID: #571
Description:
Create a function to parse tool-version (asdf-vm) format, add the associated tests, and updated the documentation
Related issue:
#571
Check list: