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

revert: revert: build: remove dependency on Python sass module #34502

Merged
merged 5 commits into from
Apr 12, 2024

Commits on Apr 11, 2024

  1. Configuration menu
    Copy the full SHA
    53ffd5c View commit details
    Browse the repository at this point in the history
  2. fix: NameErrors in compile_sass.py

    Fixes three NameErrors which were introduced by the previous commit,
    leading to it being reverted.
    
    These NameErrors slipped through because the script was not tested on
    any themes that had zero SCSS overrides.
    kdmccormick committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    eab3819 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. test: add a dummy empty theme

    This will be used to protect against bugs like the on fixed in the
    previous commit.
    kdmccormick committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    8f43816 View commit details
    Browse the repository at this point in the history
  2. test: compile built-in themes as part of static assets check

    This will help safe-guard against bugs in the Sass and Webpack build
    which only arise from certain uses of the legacy Comprehensive Theming
    system.
    kdmccormick committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    94d7e14 View commit details
    Browse the repository at this point in the history
  3. fix: --theme-dirs argument to compile_sass management command

    This fixes the ability to pass custom theme directories to
    the management command which compiles site themes, a la:
    
       ./manage.py lms compile_sass --theme-dirs /my/custom/themes/dir
    
    The exception, which was due to a incompatible use of @lru_cache, was:
    
       File "openedx/core/djangoapps/theming/management/commands/compile_sass.py",
       line 93, in parse_arguments:
         available_themes.update({t.theme_dir_name: t for t in get_themes([theme_dir])})
       TypeError: unhashable type: 'list'
    
    This has been broken since the @lru_cache decorator was added, but it
    wasn't noticed because:
    
    * We weren't compiling any comprehensive themes in CI.
    * Tutor supports compehensive theming, but not *site theming*, so
      it doesn't use this management command at all
      (site themeing == comp theming * site configuration).
    * Although edx.org executes this management command, it does not provide
      use the `--theme-dirs` argument, so the bug was not hit.
    kdmccormick committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    101aead View commit details
    Browse the repository at this point in the history