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

Reactive updates don’t work for modules that load data loaders #1661

Closed
mbostock opened this issue Sep 13, 2024 · 0 comments · Fixed by #1662
Closed

Reactive updates don’t work for modules that load data loaders #1661

mbostock opened this issue Sep 13, 2024 · 0 comments · Fixed by #1662
Assignees
Labels
bug Something isn’t working

Comments

@mbostock
Copy link
Member

mbostock commented Sep 13, 2024

Consider test.md:

```js
import {test} from "./test.js";

display(await test());
```

And test.js:

import {FileAttachment} from "npm:@observablehq/stdlib";

export async function test() {
  return FileAttachment("./test.txt").text();
}

And test.txt.js:

process.stdout.write("hello");

If you edit test.txt.js, it should change the hash of test.js, and cause the page /test to update. But it doesn’t because getModuleHash doesn’t allow for a FileAttachment being backed by a data loader.

@mbostock mbostock added the bug Something isn’t working label Sep 13, 2024
@mbostock mbostock self-assigned this Sep 13, 2024
@mbostock mbostock changed the title Reactive updates don’t work for parameterized modules that load a parameterized file with relative path Reactive updates don’t work for modules that load data loaders Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant