Title: `rs fmt` cache misses changes to files read by 3rd-party prettier plugins · Issue #609 · rstackjs/rstack-cli · GitHub
Open Graph Title: `rs fmt` cache misses changes to files read by 3rd-party prettier plugins · Issue #609 · rstackjs/rstack-cli
X Title: `rs fmt` cache misses changes to files read by 3rd-party prettier plugins · Issue #609 · rstackjs/rstack-cli
Description: Problem For example, prettier-plugin-tailwindcss sorts classes based on the stylesheet set by tailwindStylesheet. After that stylesheet changes, rs fmt --check can still pass because the cache is hit, while rs fmt --check --no-cache fail...
Open Graph Description: Problem For example, prettier-plugin-tailwindcss sorts classes based on the stylesheet set by tailwindStylesheet. After that stylesheet changes, rs fmt --check can still pass because the cache is h...
X Description: Problem For example, prettier-plugin-tailwindcss sorts classes based on the stylesheet set by tailwindStylesheet. After that stylesheet changes, rs fmt --check can still pass because the cache is h...
Opengraph URL: https://github.com/rstackjs/rstack-cli/issues/609
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`rs fmt` cache misses changes to files read by 3rd-party prettier plugins","articleBody":"## Problem\n\nFor example, `prettier-plugin-tailwindcss` sorts classes based on the stylesheet set by `tailwindStylesheet`. After that stylesheet changes, `rs fmt --check` can still pass because the cache is hit, while `rs fmt --check --no-cache` fails.\n\nOur cache is on by default, this is actually a correctness issue. But it's hard to resolve:\n\n- Prettier has no API for plugins to report the files they depend on.\n- The referenced files can pull in more files, such as Tailwind's `@import`, `@plugin`, and `@source`.\n\nUpstream `prettier --cache` and `@prettier/cli` have the same limitation.\n\n## Possible solutions\n\n1. **Disable the cache when third-party plugins are configured.** Skip the cache for files whose options include plugins from `plugins`. This is always correct, at the cost of losing the cache for those projects. It can be combined with option 3 so users can opt back in.\n2. **Special-case common plugins.** For plugins such as `prettier-plugin-tailwindcss`, include the content of files referenced by known options (`tailwindStylesheet`, `tailwindConfig`) and the installed `tailwindcss` version in the cache key. This covers the most common case without configuration, but cannot be complete.\n3. **Let users declare extra cache inputs.** Add an option to `define.fmt()` whose file contents are included in the cache key, for example `cacheInputs: ['./src/app.css']`.\n","author":{"url":"https://github.com/elecmonkey","@type":"Person","name":"elecmonkey"},"datePublished":"2026-11-02T09:03:24Z","url":"https://github.com/rstackjs/rstack-cli/issues/609"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8ad66150-681e-0ce0-5dca-0dee4661ebe3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C75E:252E77:2771B8:34264C:6AEC1B8F |
| html-safe-nonce | 8e51d393d9a2cc5e6b4e53a0e47df903c0c82f651bb4393603eee7525b0fe292 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzVFOjI1MkU3NzoyNzcxQjg6MzQyNjRDOjZBRUMxQjhGIiwidmlzaXRvcl9pZCI6IjMyODY0MDc4NDczOTMxMDY4MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cf6a6a1147f0db0bed262e1a0a9d744ab37544d6af86e47486fbcbef37b6429d |
| hovercard-subject-tag | issue:6159441165 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rstackjs/rstack-cli/609/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0bd9f499f2433d4da2bd9080ca150d518fdcdfabb0d27633e1160ea02f97014f/rstackjs/rstack-cli/issues/609 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0bd9f499f2433d4da2bd9080ca150d518fdcdfabb0d27633e1160ea02f97014f/rstackjs/rstack-cli/issues/609 |
| og:image:alt | Problem For example, prettier-plugin-tailwindcss sorts classes based on the stylesheet set by tailwindStylesheet. After that stylesheet changes, rs fmt --check can still pass because the cache is h... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | elecmonkey |
| hostname | github.com |
| expected-hostname | github.com |
| None | d063d52022f5f270ef55a70761d126c8085d492d3c251084b07781784c02dad4 |
| turbo-cache-control | no-preview |
| go-import | github.com/rstackjs/rstack-cli git https://github.com/rstackjs/rstack-cli.git |
| octolytics-dimension-user_id | 129049372 |
| octolytics-dimension-user_login | rstackjs |
| octolytics-dimension-repository_id | 1138027854 |
| octolytics-dimension-repository_nwo | rstackjs/rstack-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1138027854 |
| octolytics-dimension-repository_network_root_nwo | rstackjs/rstack-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56e59340194011ba3cb6809acfa979ccbd174288 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width