GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support to .tool-version file format by elpic · Pull Request #588 · actions/setup-python

Conversation

@elpic

@elpic elpic commented Jan 17, 2023

Copy link
Copy Markdown

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:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

plukevdh, onnimonni, bsilverthorn, devmotion, goetzc, AllexVeldman, shotashimizu-kkhs, KyleKing, jlarmstrongiv, NVolcz, and 3 more reacted with thumbs up emoji
All reactions
  • 👍 13 reactions
@elpic
elpic requested a review from a team as a code owner January 17, 2023 21:36
@elpic elpic mentioned this pull request Jan 17, 2023
Unable to use asdf-vm based version-file #571
Closed
1 task done
@e-korolevskii

e-korolevskii commented Jan 18, 2023

Copy link
Copy Markdown
Contributor

Hello @elpic!
Thanks for your contribution! Some workflows failed, let's try to complete them.
Could you please run the format and build commands?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dmitry-shibanov
dmitry-shibanov reviewed Jan 18, 2023
View reviewed changes
Comment thread src/setup-python.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

dmitry-shibanov
dmitry-shibanov reviewed Jan 18, 2023
View reviewed changes
Comment thread docs/advanced-usage.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@elpic
elpic requested a review from dmitry-shibanov January 18, 2023 11:23
dmitry-shibanov
dmitry-shibanov reviewed Jan 18, 2023
View reviewed changes
Comment thread docs/advanced-usage.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@elpic
elpic requested a review from dmitry-shibanov January 18, 2023 13:02
@elpic

elpic commented Jan 20, 2023

Copy link
Copy Markdown
Author

Would it be possible for you @dmitry-shibanov to run the failing tests?

marko-zivic-93 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

IvanZosimov
IvanZosimov reviewed Jan 31, 2023
View reviewed changes
Comment thread src/utils.ts
let pythonVersion: string | undefined;

// Try to find the version in tool-version file
const found = contents.match(/^(?:python\s+)?v?(?<version>[^\s]+)$/m);

@IvanZosimov IvanZosimov Jan 31, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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-version input 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@elpic elpic Mar 14, 2023

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@IvanZosimov IvanZosimov Mar 14, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tanguyantoine tanguyantoine Nov 30, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dmitry-shibanov

dmitry-shibanov commented Feb 21, 2023

Copy link
Copy Markdown
Contributor

Hello @elpic, just a gentle ping.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@e-korolevskii

e-korolevskii commented Mar 14, 2023

Copy link
Copy Markdown
Contributor

Hello @elpic, just a gentle ping.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elpic

elpic commented Mar 14, 2023

Copy link
Copy Markdown
Author

Sorry I will take a look in a moment

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@plukevdh

plukevdh commented Apr 8, 2023

Copy link
Copy Markdown

Any chance this gets reviewed soon?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camflan

camflan commented May 19, 2023

Copy link
Copy Markdown

Any chance this gets reviewed soon?

Looks like there are a few checks failing that need addressed. @elpic any chance you have time to turn this PR green? 😅

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced May 19, 2023
feat: Utilize the.tool-versions file to set expected Go version actions/setup-go#375
Closed
Parse .tool-versions file to determine Go version actions/setup-go#376
Closed
utilize .tool-versions file to resolve terraform version hashicorp/setup-terraform#323
Open
elpic added 3 commits May 31, 2023 09:02
@elpic
Add support to .tool-version file format
892baae
Create a function to parse tool-version (asdf-vm) format, add the
associated tests, and updated the documentation

Ticket-ID: #571
@elpic
Fix suggestios done in code review
3d009a5
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
@elpic
Fix style issues and build
59a7889
Build the project using `npm run build` and run prettier using `npm run
format`
@elpic

elpic commented May 31, 2023

Copy link
Copy Markdown
Author

Sorry for the delay. The code is formatted now

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dusan-trickovic dusan-trickovic linked an issue Jul 13, 2023 that may be closed by this pull request
Unable to use asdf-vm based version-file #571
Closed
1 task done
9777410929
9777410929 approved these changes Aug 18, 2023
View reviewed changes
@devmotion devmotion mentioned this pull request Oct 2, 2023
[Feature Request] Support .tool-versions files julia-actions/setup-julia#167
Open
@tanguyantoine

tanguyantoine commented Nov 30, 2023

Copy link
Copy Markdown

@elpic this is a great improvement for this action 👏

KyleKing reacted with thumbs up emoji NVolcz reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tanguyantoine

tanguyantoine commented Jan 4, 2024

Copy link
Copy Markdown

Can we get this merged?

NVolcz reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aiwilliams

aiwilliams commented Aug 29, 2024

Copy link
Copy Markdown

This would be a great addition.

armg-teruo-kakikubo reacted with hooray emoji NVolcz reacted with heart emoji
All reactions
  • 🎉 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@1stvamp

1stvamp commented Nov 13, 2024

Copy link
Copy Markdown

Another +1 for merging this 🙏

NVolcz reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@edubacco

edubacco commented Feb 12, 2025

Copy link
Copy Markdown

I'd love to have this merged 🙏

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@v-mahabaleshwars

v-mahabaleshwars commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

Hello @elpic,
There are conflicts that need to be resolved before merging. Please resolve these conflicts and address any other issues. Once resolved, we will review it before merging.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@v-mahabaleshwars

v-mahabaleshwars commented Feb 25, 2025

Copy link
Copy Markdown
Contributor

Hi @elpic,
Just a friendly reminder to resolve the conflicts when you get a chance. Once everything is addressed, we’ll be happy to review and merge. Let us know if you need any help!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@veimox veimox mentioned this pull request Mar 13, 2025
feat: support reading version from mise.toml #1051
Closed
2 tasks
@v-mahabaleshwars

v-mahabaleshwars commented Mar 25, 2025

Copy link
Copy Markdown
Contributor

Hi @elpic,

We are closing this Pull Request as this feature is implemented in PR #1043.
Please feel free to reach out if you need any further assistance.

yukha-dw reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@v-mahabaleshwars v-mahabaleshwars closed this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dmitry-shibanov dmitry-shibanov Awaiting requested review from dmitry-shibanov
3 more reviewers
@tanguyantoine tanguyantoine tanguyantoine left review comments
@IvanZosimov IvanZosimov IvanZosimov left review comments
@9777410929 9777410929 9777410929 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Unable to use asdf-vm based version-file

Uh oh!

There was an error while loading. Please reload this page.

12 participants

@elpic @e-korolevskii @dmitry-shibanov @plukevdh @camflan @tanguyantoine @aiwilliams @1stvamp @edubacco @v-mahabaleshwars @IvanZosimov @9777410929
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.