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

Extension scss isn't being discovered #5794

Closed
dgkf opened this issue Jun 2, 2023 · 2 comments
Closed

Extension scss isn't being discovered #5794

dgkf opened this issue Jun 2, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dgkf
Copy link

dgkf commented Jun 2, 2023

Bug description

Following up on the bug fix from #3414, the patched version of the code seems to not discover/use extension scss at all.

Given just a _variables.scss file that includes a single line,

@import "definitely/not/a/file"

Quarto will render the document without issue, even though this file clearly should throw an error.

Possibly related - In the process of testing this out, I also couldn't seem to clear quarto's cache entirely. A previous iteration of this test used $primary: #F00; as the contents of the _variables.scss file and this is still affecting the webpage's style, even in a private browser or separate browser entirely. I've tried deleting every quarto-generated file I can find and running with --no-cache, but can't seem to get rid of this cached stylesheet. Perhaps this is related to the current file not throwing errors. Is there a better way to get quarto to render a project from scratch?

Steps to reproduce

  1. Clone this repo: https://github.com/dgkf/quarto-revealjs-theme-reprex (@quarto-cli-issue-5794)
  2. Run quarto preview
  3. Quarto should successfully build the webpage
  4. Open _extensions/custom/scss/_variables.scss and observe that it should throw a SCSS file-not-found error

Expected behavior

_variables.scss from the extension is picked up by quarto, resulting in an error

Actual behavior

Site builds, and does not appear to use the theme scss

Your environment

Quarto check output

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      Path: /Users/kelkhofd/Projects/quarto-cli/package/dist/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.3
      Path: /opt/homebrew/opt/python@3.11/bin/python3.11
      Jupyter: 5.3.0
      Kernels: julia-1.8

      NOTE: No Jupyter k

Note, I omitted errors finding R because I run R in a docker container and quarto doesn't like that it can't find it's system temp session directory. I'm pretty sure it's unrelated to this bug.

@dgkf dgkf added the bug Something isn't working label Jun 2, 2023
@dragonstyle
Copy link
Collaborator

Thanks for reporting this, I've have a look at why we're not throwing.

As far as the cache not properly invalidating, this is definitely caused because the key for cache validation is a hash of the scss theme file contents (not its imports, incorrectly). Since the changes are limited to the imported files, we are missing those changes and using the cache. I'll definitely do something about this to make it automatic.

@dragonstyle dragonstyle self-assigned this Jun 2, 2023
@dragonstyle dragonstyle added this to the v1.4 milestone Jun 2, 2023
@dragonstyle
Copy link
Collaborator

Thx again, a fix is on the way!

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

No branches or pull requests

2 participants