actions / actions/toolkit

Enable fourth part or additional tag for tool cache versioning

Open
#1,233 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

I am trying to author a JavaScript action to leverage the tool cache. The software that I would like to cache requires a fourth part for the version number. An additional tag would also work.

Currently, tool-cache is leveraging semver.clean to restrict to a version of type X.Y.Z. It looks like semver.clean is in several functions in tool-cache.ts, but it is something like semver.clean(version) || version. In the find function in tool-cache, there is a line versionSpec = semver.clean(versionSpec) || '' that makes this a hard requirement.

Would it be possible to either loosen this restriction or use semver.clean(version, { loose: true }) to allow a tag to be applied when caching and searching the tool-cache?

Thanks,
David

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tool-cache.ts, especially the find function and the other semver.clean call sites, to trace how versions are normalized. The change is done when tool-cache can cache and search software using a fourth version part or an additional tag, rather than requiring only X.Y.Z.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.