Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[heft-sass-plugin] Incremental cache file name depends on the machine (absolute build folder, core count)

Open Beginner friendly
#6,126 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
sass, typescript
Domain
build-system

Research direction

The cache file name is computed in SassProcessor.loadCacheAsync from JSON.stringify(this.#options), and the options are assembled in SassPlugin. Check which fields there are absolute paths or concurrency, then either relativize them to buildFolder before hashing or switch to a fixed file name with the hash stored inside. Done when two builds in different checkout folders or core counts produce the same temp/build/sass listing and the cache still invalidates on real option changes.

Written by the indexing model from the issue text.

Description

🤖 Filed by GitHub Copilot acting for @namankanakiya (light review only).

Package: @rushstack/heft-sass-plugin 1.5.1 (with @rushstack/heft 1.3.3), Linux.

Summary: the plugin's incremental cache file name depends on the machine (the absolute build folder and the core count), so identical builds on different machines or in different checkout folders produce different output folder listings.

Source: SassProcessor.loadCacheAsync computes

configHash = getContentsHash('sass.json', JSON.stringify(this.#options)).slice(0, 8)

and writes temp/build/sass/sass_<configHash>.json. The options come from SassPlugin and include:

  • buildFolder (absolute),
  • srcFolder, dtsOutputFolders, cssOutputFolders, loadPaths (resolved to absolute paths),
  • concurrency = heftConfiguration.numberOfCores (os.availableParallelism()).

Repro: build the same project twice, once normally and once with taskset -c 0-7 (or from a different checkout folder). temp/build/sass contains sass_9nUQkQ8d.json in one build and sass_DDgrCciE.json in the other.

Observed: identical inputs give different output listings. Build-cache entries produced on different machines (for example CI vs a developer box) differ, and tools that compare or hash output folder listings see a change where there is none, which can trigger needless downstream rebuilds.

Expected: the file name depends only on options that affect the output.

Suggested fix (either):

  1. Hash the options with folders made relative to buildFolder and without concurrency (and any other non-semantic fields), or
  2. Use a fixed file name (for example temp/build/sass/sass.json) and store the options hash inside the file, invalidating the cache when it does not match.

Happy to test a candidate fix.

Dominant language
TypeScript
Stars
6.5k
Forks
710
Avg merge
1d 13h
Merged PRs (30d)
45

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from microsoft/rushstack

All issues in microsoft/rushstack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.