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

Fail the build if compilation fails with any of our supported Sass compilers #1684

Closed
1 task done
36degrees opened this issue Dec 23, 2019 · 3 comments · Fixed by #1747
Closed
1 task done

Fail the build if compilation fails with any of our supported Sass compilers #1684

36degrees opened this issue Dec 23, 2019 · 3 comments · Fixed by #1747
Assignees

Comments

@36degrees
Copy link
Contributor

36degrees commented Dec 23, 2019

What

Compile the GOV.UK Frontend Sass using the minimum version of each of the Sass compilers that we support.

Fail the build if it fails to compile using any one of them.

Why

So that we have the confidence to ship releases whilst knowing that they should work with any of the Sass compilers that we support

Questions / prompts

  • Should we also consider compare the output of the different compilers to ensure they're effectively equivalent? (May be very difficult if there are big differences in order / whitespace etc?)
  • Check to see if any other Sass frameworks are already doing this.
  • What impact will this have on our CI run time?

Dependencies

@NickColley
Copy link
Contributor

NickColley commented Feb 20, 2020

From my investigation there is very minor differences in the output between compilers.

We will document the minimum we expect our users to require in our install documentation.

To test the minimum if our build pipeline I think is not worth the complexity at this point.

Ruby sass would require us to add Ruby infrastructure to the project, and it is a deprecated project.

The minimum version of libsass we'd need to run an older version of Node.js

The only thing we could consider is testing dart-sass, but I think it's probably worth relying on support issues instead given what I've seen.

@36degrees
Copy link
Contributor Author

This is what I had in mind for testing different Sass compilers:

https://github.com/alphagov/govuk-frontend/compare/test-sass-compilers?expand=1

Which results in a build output like this:
https://travis-ci.com/alphagov/govuk-frontend/builds/150464036

I believe we could set the additional two tasks up as separate jobs rather than separate stages, which would allow them to run in parallel rather than in series. I'm just trying to get my head around the syntax required to do that.

Is that less complex than you'd been imagining?

@NickColley
Copy link
Contributor

Is that less complex than you'd been imagining?

Being able to conditionally specify node versions with Travis simplifies most of my worries.

Would be good to keep any eye on the additional time it might take, or if it could create a bottleneck.

36degrees added a commit that referenced this issue Feb 25, 2020
Compile the GOV.UK Frontend Sass using the minimum version of each of the Sass compilers that we support:

- LibSass v3.3.0
- Dart Sass v1.0.0
- Ruby Sass v3.4.0 (deprecated; not recommended)

Fail the build if it fails to compile using any one of them.

We're doing this so that we have the confidence to ship releases whilst knowing that they should work with any of the Sass compilers that we support.

Closes #1684
36degrees added a commit that referenced this issue Feb 25, 2020
Compile the GOV.UK Frontend Sass using the minimum version of each of the Sass compilers that we support:

- LibSass v3.3.0
- Dart Sass v1.0.0
- Ruby Sass v3.4.0 (deprecated; not recommended)

Fail the build if it fails to compile using any one of them.

We're doing this so that we have the confidence to ship releases whilst knowing that they should work with any of the Sass compilers that we support.

This also removes a before_deploy step (because we no longer have a deploy step) and the sudo key as according to Travis' config linter it has no effect any more.

Closes #1684
36degrees added a commit that referenced this issue Feb 25, 2020
Compile the GOV.UK Frontend Sass using the minimum version of each of the Sass compilers that we support:

- LibSass v3.3.0
- Dart Sass v1.0.0
- Ruby Sass v3.4.0 (deprecated; not recommended)

Fail the build if it fails to compile using any one of them.

We're doing this so that we have the confidence to ship releases whilst knowing that they should work with any of the Sass compilers that we support.

This also removes a before_deploy step (because we no longer have a deploy step) and the sudo key as according to Travis' config linter it has no effect any more.

Closes #1684
@36degrees 36degrees assigned 36degrees and unassigned NickColley Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants