Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen Anfängerfreundlich
#6,126 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
sass, typescript
Bereich
build-system

Rechercherichtung

Der Name der Cache-Datei wird in SassProcessor.loadCacheAsync aus JSON.stringify(this.#options) berechnet, und die Optionen werden in SassPlugin zusammengestellt. Prüfe, welche Felder absolute Pfade oder concurrency sind, und entweder mache sie relativ zu buildFolder, bevor gehasht wird, oder wechsle zu einem festen Dateinamen mit dem Hash darin gespeichert. Fertig ist es, wenn zwei Builds in verschiedenen Checkout-Ordnern oder mit unterschiedlicher Kernanzahl dieselbe Auflistung von temp/build/sass erzeugen und der Cache bei echten Optionsänderungen trotzdem ungültig wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

🤖 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.

Vorherrschende Sprache
TypeScript
Sterne
6.5k
Forks
710
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
37

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/rushstack

Alle Issues in microsoft/rushstack

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.