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

quarto preview on a website project not watching resources on repeat previews #7385

Open
declann opened this issue Oct 27, 2023 · 4 comments
Assignees
Labels
bug Something isn't working ojs-engine Issues with the ojs engine preview issues related to the `preview` command
Milestone

Comments

@declann
Copy link

declann commented Oct 27, 2023

Bug description

I'm noticing very inconsistent resource hot reload in quarto preview.
Steps reproduce on my Ubuntu machine.

I think that watch is not working where files already present in the _site folder are recycled - this or something cache-related perhaps.

Steps to reproduce

git clone https://gitlab.com/declann/quarto-issue-parent-resource-locations.git
cd quarto-issue-parent-resource-locations/website
quarto preview
# edit website/resources/umd.js e.g. in a separate shell in website location run:
echo "// hello" >> ./resources/umd.js
# my result: here I get a hot reload
# cancel quarto with ctrl+c
quarto preview
echo "// hello" >> ./resources/umd.js # in website location
# my result: here I don't get a hot reload

Expected behavior

I expect consistent hot reloads whenever umd.js is modified.

Actual behavior

In first instance of quarto preview I get a hot reload, in follow ups I don't.
Appears perfectly repeatable on my Ubuntu machine.

Your environment

quarto 1.4.451
Ubuntu 22.04.3 LTS

Quarto check output

Quarto 1.4.451
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.8: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.451
      Path: /opt/quarto/bin
@declann declann added the bug Something isn't working label Oct 27, 2023
@cscheid cscheid added this to the v1.5 milestone Oct 28, 2023
@cscheid cscheid self-assigned this Oct 28, 2023
@cscheid
Copy link
Collaborator

cscheid commented Oct 28, 2023

Thanks for the report.

The proper fix for this is relatively involved, and requires a more thorough tracking of which input files are dependencies of which output files than what we do right now. We intend to tackle this in 1.5, specifically in #6518.

@declann
Copy link
Author

declann commented Oct 28, 2023

Thanks Carlos.
I'll consider workarounds like adding rm -rf _site before my quarto preview command in the mean time.

@cscheid
Copy link
Collaborator

cscheid commented Oct 28, 2023

Using quarto preview --render html also works: it forces a rendering to html before previewing.

@cscheid cscheid added ojs-engine Issues with the ojs engine observable-js labels Oct 28, 2023
@declann
Copy link
Author

declann commented Oct 28, 2023

Using quarto preview --render html also works: it forces a rendering to html before previewing.

Thanks!

@cscheid cscheid modified the milestones: v1.5, v1.6 Jun 12, 2024
@cscheid cscheid added the preview issues related to the `preview` command label Jun 12, 2024
@cscheid cscheid modified the milestones: v1.6, Future Jun 12, 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 ojs-engine Issues with the ojs engine preview issues related to the `preview` command
Projects
None yet
Development

No branches or pull requests

2 participants