Skip to content

site_libs dependency not updated when freeze is used.  #10391

Open

Description

@cderv

Observed behavior

I was testing revealjs/update-v5 branch in dev quarto-cli to render our demo slides at https://quarto.org/docs/presentations/revealjs/demo/

This new branch is using revealjs 5.1.0 and I would have expected this to be used.

cd quarto-web
# doing incremental render 
quarto render .\docs\presentations\revealjs\demo\index.qmd

Dependency in site_libs was updated

❯ grep -2 "revealjs[.]com" .\_site\site_libs\revealjs\dist\reveal.js
/*!
* reveal.js 5.1.0
* https://revealjs.com
* MIT licensed
*

But freezer is still using old version

❯ grep -2 "revealjs[.]com" .\_freeze\site_libs\revealjs\dist\reveal.js
/*!
* reveal.js 4.3.1
* https://revealjs.com
* MIT licensed
*

which implies that with freeze: true in our quarto-web project when doing

quarto render

the freezer is used for site_libs it seems, and the old revealjs is used... After quarto render I get

❯ grep -2 "revealjs[.]com" .\_site\site_libs\revealjs\dist\reveal.js
/*!
* reveal.js 4.3.1
* https://revealjs.com
* MIT licensed
*

back to old one.

If I delete the file, then the new version is put in freezer.

So I believe this is a conflict similar to our "different themes in websites", but when using freeze. All the revealjs presentation in the website are using same file in site_libs/.

It seems site_libs in the freezer will always win. So it needs to be updated somehow.

I need to understand this, and see what is the recommended way : Manuel invalidation or a fix in our site_libs handling...

Activity

  1. added
    bugSomething isn't working
    websitesIssues creating websites
    revealjsIssues with the revealjs format
    on Jul 26, 2024
  2. added this to the v1.6 milestone on Jul 26, 2024
  3. self-assigned this
    on Jul 26, 2024
  4. cderv commented on Jul 26, 2024

    @cderv
    MemberAuthor

    And it seems we also have another copy of the dependency in .quarto project hidden folder

    ❯ grep -2 "revealjs[.]com" .\.quarto\_freeze\site_libs\revealjs\dist\reveal.js
    /*!
    * reveal.js 4.3.1
    * https://revealjs.com
    * MIT licensed
    *

    Not sure how it behave when new updated quarto with new revealjs update is used. 🤔

    I'll try to build an easier example to investigate all this...

  5. cderv commented on Jul 26, 2024

    @cderv
    MemberAuthor

    I'll try to build an easier example to investigate all this...

    right now I can't reproduce on a simple website... It happens only inside quarto-web

  6. cscheid commented on Jul 26, 2024

    @cscheid
    Member

    I wouldn't touch the freeze implementation without a longer discussion with @jjallaire and @dragonstyle; there's a lot of corner cases involved.

  7. cderv commented on Oct 18, 2024

    @cderv
    MemberAuthor

    And we are hitting the problem in

    I added new feature in quarto-support plugin, which requires an updated version of this plugin, and quarto-web still have the old version in freeze, which is used despite doing incremental rendering.

    So we definitely have something going that is not great experience. I think I can solve in Quarto web by rerendering every presentations, or removing the revealjs folder from freeze.

  8. cscheid commented on Oct 18, 2024

    @cscheid
    Member

    Let's have a discussion about this early in 1.7.

  9. added
    early-in-releaseAn issue that should be worked on early in the release (likely due to risk)
    needs-discussionIssues that require a team-wide discussion before proceeding further
    on Oct 18, 2024
  10. modified the milestones: v1.6, 1.7 on Oct 18, 2024
  11. cderv commented on Oct 29, 2024

    @cderv
    MemberAuthor

    Just referencing another occurence of this

    v1.6 is updating quarto-listing.js following #11177 - this change was not reflected in quarto-web until an incremental quarto render is ran on one of the blog post.

    Though in the meantime, other change like .ejs template where applying and so old quarto-listing.js was no more adequate, leading to breakage in #11230.

    Again, not great... we should have a way for quarto when rendered with a new version to tell the freezer site_libs to be updated when we known it needs to 🤔

  12. removed their assignment
    on Oct 29, 2024
  13. removed
    revealjsIssues with the revealjs format
    on Oct 29, 2024
  14. modified the milestones: v1.7, v1.8 on Apr 7, 2025
  15. cscheid commented on May 15, 2025

    @cscheid
    Member

    In order to fix this, we need to change our freezer implementation to record more information.

  16. modified the milestones: v1.8, Future on May 15, 2025
  17. cderv commented on Nov 6, 2026

    @cderv
    MemberAuthor

    Hit this again with Quarto 1.12.1, and it reproduces on a simple website, which I could not get earlier in this thread.

    Minimal project: _quarto.yml with project: {type: website, output-dir: _site} and execute: {freeze: true}, one engine: knitr page with an R chunk (so it gets a freezer entry), and one format: revealjs page. Run quarto render, then append a line to _freeze/site_libs/revealjs/plugin/quarto-line-highlight/line-highlight.js and run quarto render again. The appended line shows up in _site/site_libs/revealjs/plugin/quarto-line-highlight/line-highlight.js, so the freezer copy wins over the files Quarto just generated.

    This is the part of render-files.ts that copies site_libs from the freezer over the output libs as soon as a frozen page is thawed:

    // copy the site_libs dir from the freezer
    const libDir = context.project?.config?.project[kProjectLibDir];
    if (libDir) {
    copyFromProjectFreezer(context.project, libDir, hidden);
    }

    So the freezer keeps whatever revealjs runtime was committed, whatever the Quarto version doing the render.

    In quarto-web, the preview of a new revealjs option rendered with 1.12.1 showed the wrong behaviour because the committed freezer had an old line-highlight.js. quarto.org and prerelease.quarto.org were serving that same old file. I worked around it by regenerating _freeze/site_libs/revealjs from a 1.12.1 render in quarto-dev/quarto-web#2346.

    On recording more information in the freezer: we could stamp the frozen site_libs with the Quarto version that wrote them, and drop them when it differs from the rendering version. @cscheid does that match what you had in mind, or are there corner cases it misses?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingearly-in-releaseAn issue that should be worked on early in the release (likely due to risk)needs-discussionIssues that require a team-wide discussion before proceeding furtherwebsitesIssues creating websites

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions