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

fix: update libsass to v0.21.0 #27683

Closed
wants to merge 4 commits into from
Closed

Conversation

davidjoy
Copy link
Contributor

@davidjoy davidjoy commented May 19, 2021

Updates libsass to latest. Requires an update to the edx.org-next theme https://github.com/edx/edx-themes/pull/737

  • Merge https://github.com/edx/edx-themes/pull/737 before this PR

  • Libsass is now stricter about undefined placeholder mixins, and so we had to mark a bunch of broken code as !optional. We had upgraded libsass until it broke with this version: https://github.com/sass/libsass/releases/tag/3.3.3 That release of libsass included a fix for a missing error on undefined placeholders. Our code was has existing missing placeholders, now it just complains. This PR fixes those.

  • Libsass @extend seems to have changed behavior in such a way that our usage of it our theme bloats the css output to a point where it's either 10s of megabytes or simply fails to compile. https://github.com/edx/edx-themes/pull/737 addresses this.

Key file sizes

File Production This PR + https://github.com/edx/edx-themes/pull/737
lms-course.css 778kb 1.3mb
lms-discussion-bootstrap.css 189kb 189kb
lms-footer-edx.css 389kb 105kb
lms-main-v1.css 2.2mb 1.2mb
lms-main.css 1.3mb 351kb
studio-main-v1.css 1.1mb 2.1mb

Sandbox: https://libsass-upgrade.sandbox.edx.org/
(edx-app: djoy/update_libsass_to_0.20.1)
(edx-themes: abutterworth/libsass-upgrade)

Create Sandbox Job: https://tools-edx-jenkins.edx.org/job/sandboxes/job/CreateSandbox/39080/

Testing

  • Confirm CSS outputs are not unreasonably large for both no theme and edx.org-next theme
  • Confirm edx.org verified track upsells are not affected

@mraarif
Copy link
Contributor

mraarif commented May 20, 2021

@davidjoy have you seen the attempt we did in #24464

@davidjoy
Copy link
Contributor Author

Hi @mraarif -

Thanks for the link!

I think the approach taken in this PR is a bit more 'surgical' and minimal, so I'm inclined to go forward with it. We manually walked through every error we encountered and fixed them individually, so it doesn't add any !optional flags in places it doesn't technically need them.

Are you aware of any issues in the code here? Happy to learn from your wisdom/effort!

Updating libsass to latest.  Libsass is now stricter about undefined placeholder mixins, and so we had to mark a bunch of broken code as !optional.

We had upgraded libsass until it broke with this version: https://github.com/sass/libsass/releases/tag/3.3.3

That release of libsass included a fix for a missing error on undefined placeholders.

Our code was always wrong, now it just complains.  This PR fixes it.
@davidjoy davidjoy force-pushed the djoy/update_libsass_to_0.20.1 branch from 412cf73 to 935e173 Compare May 24, 2021 15:47
@mraarif
Copy link
Contributor

mraarif commented May 24, 2021

seems like you know what you're up against, I just mentioned it if you could use the context and discoveries we made in that PR

@abutterworth abutterworth changed the title fix: update libsass to v0.20.1 fix: update libsass to v0.21.0 May 25, 2021
No longer rely on themes to import bootstrap functions
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@arch-bom-gocd-alerts
Copy link

📣 💥 Heads-up: You must either rebase onto master or merge master into your branch to avoid breaking the build.

We recently removed diff-quality and introduced lint-amnesty. This means that the automated quality check that has run on your branch doesn't work the same way it will on master. If you have introduced any quality failures, they might pass on the PR but then break the build on master.

This branch has been detected to not have commit 2e33565 as an ancestor. Here's how to see for yourself:

git merge-base --is-ancestor 2e335653 djoy/update_libsass_to_0.20.1 && echo "You're all set" || echo "Please rebase onto master or merge master to your branch"

If you have any questions, please reach out to the Architecture team (either #edx-shared-architecture on Open edX Slack or #architecture on edX internal).

@kdmccormick
Copy link
Member

This work has stalled. See #31616.

@kdmccormick kdmccormick deleted the djoy/update_libsass_to_0.20.1 branch July 5, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants