Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidated resources remain invalid after load unless navigation occurs #10677

Closed
davideaster opened this issue Sep 2, 2023 · 2 comments
Closed
Milestone

Comments

@davideaster
Copy link

Describe the bug

After a dependency has been marked invalid, further invalidations of any resource will rerun a load function if it is dependent on the first resource, even after load has run following the first invalidation. Invalidated resources remain invalid until the next navigation.

If invalidateAll has marked all dependencies invalid, further invalidations of any resource will rerun any load function. This condition remains until the next navigation.

Reproduction

A demonstration application is at https://github.com/davideaster/sveltekit-invalidations . Reproduction details are in the README.

Logs

No response

System Info

$ npx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite}"

  System:
    OS: macOS 11.7.9
    CPU: (8) x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
    Memory: 77.72 MB / 16.00 GB
    Shell: 5.2.15 - /usr/local/bin/bash
  Binaries:
    Node: 20.5.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.0 - /usr/local/bin/npm
    Watchman: 2023.07.24.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 116.0.5845.140
    Safari: 16.6
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.1.0 
    @sveltejs/kit: ^1.20.4 => 1.24.0 
    svelte: ^4.0.5 => 4.2.0 
    vite: ^4.4.2 => 4.4.9

Severity

annoyance

Additional Information

No response

@lucas-subli
Copy link

This seems to be the main issue behind: #10457

@dummdidumm
Copy link
Member

Adding this to 2.0 because if we change this one could technically see this as a breaking change (one could rely on the faulty behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants