Skip to content

Commit

Permalink
Stop testing against LibSass (#1953)
Browse files Browse the repository at this point in the history
LibSass hasn't had any new feature changes in years and is unlikely to
in the future. We plan to mark it as end-of-life soon.
  • Loading branch information
nex3 authored Oct 31, 2023
1 parent afafd98 commit 7516e17
Show file tree
Hide file tree
Showing 932 changed files with 42 additions and 14,285 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,7 @@ jobs:

- name: Run specs
run: npm run sass-spec -- --dart dart-sass

libsass:
name: "Language | LibSass"
runs-on: ubuntu-latest
if: "github.event_name != 'pull_request' || !contains(github.event.pull_request.body, 'skip libsass')"

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with: {node-version: "${{ env.NODE_VERSION }}"}
- run: npm install

- name: Install SassC
run: |
export SASS_LIBSASS_PATH=$BUILD_DIR/../libsass
export SASS_SASSC_PATH=$BUILD_DIR/../sassc
git clone https://github.com/sass/libsass.git $SASS_LIBSASS_PATH
(cd $SASS_LIBSASS_PATH; git checkout $GITISH)
git clone https://github.com/sass/sassc.git $SASS_SASSC_PATH
(cd $SASS_SASSC_PATH; git checkout $GITISH)
make -C $SASS_SASSC_PATH
env:
BUILD_DIR: "${{ github.workspace }}"

- name: Run specs
run: npm run sass-spec -- --impl libsass -c ../sassc/bin/sassc


# The versions should be kept up-to-date with the latest LTS Node releases.
# They next need to be rotated October 2021. See
# https://github.com/nodejs/Release.
Expand Down
34 changes: 10 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,8 @@ npm run sass-spec -- --dart $DART_SASS_PATH

#### LibSass

To run specs against [LibSass][], the C++ Sass implementation that's used for
[Node Sass][] and other languages' Sass wrappers, you'll need to be able to
[build LibSass][]. Once you have all the build dependencies:

[LibSass]: https://sass-lang.com/libsass
[Node Sass]: https://npmjs.com/package/node-sass
[build LibSass]: https://github.com/sass/libsass/blob/master/docs/build.md

```sh
# If you already have a clone of the LibSass repo, you can use that instead.
git clone https://github.com/sass/libsass
(cd libsass; ./script/bootstrap; make sassc)
export SASSC_PATH=`pwd`/libsass/sassc/bin/sassc

npm run sass-spec -- --impl libsass -c $SASSC_PATH
```
As LibSass is approaching end-of-life and hasn't had new feature changes in
years, this repository no longer supports running tests against it.

### Spec Structure

Expand Down Expand Up @@ -183,8 +169,8 @@ against `error`.
Sometimes different Sass implementations produce different but equally-valid CSS
outputs or error messages for the same input. To accommodate this,
implementation-specific output, error, and warning files may be created by
adding `-dart-sass` or `-libsass` after the file's name (but before its
extension, in the case of `output.css`).
adding `-dart-sass` after the file's name (but before its extension, in the case
of `output.css`).

When a spec is running for an implementation with an implementations-specific
expectation, the normal expectation is ignored completely in favor of the
Expand All @@ -208,7 +194,7 @@ eventually be removed.
```yaml
---
:todo:
- sass/libsass#2827
- sass/dart-sass#123456
```
This option indicates implementations that should add support for a spec, but
Expand Down Expand Up @@ -238,7 +224,7 @@ these specs.
```yaml
---
:warning_todo:
- sass/libsass#2834
- sass/dart-sass#123456
```

This option works like [`:todo`](#todo), except instead of skipping the entire
Expand All @@ -251,7 +237,7 @@ normal. This should not be used for error specs.
```yaml
---
:ignore_for:
- libsass
- dart-sass
```

This option indicates implementations that are never expected to be compatible
Expand Down Expand Up @@ -282,9 +268,9 @@ Output does not match expectation.
i. Show me the input.
d. show diff.
O. Update expected output and pass test.
I. Migrate copy of test to pass on libsass.
T. Mark spec as todo for libsass.
G. Ignore test for libsass FOREVER.
I. Migrate copy of test to pass on dart-sass.
T. Mark spec as todo for dart-sass.
G. Ignore test for dart-sass FOREVER.
f. Mark as failed.
X. Exit testing.
```
Expand Down
8 changes: 4 additions & 4 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ be named "other" (`_other.scss`, `_other.sass`, etc).
<===> slash_slash_string/options.yml
---
:todo:
- sass/libsass#2840
- sass/dart-sass#123456
<===> slash_slash_string/input.scss
a {b: 1 / 2 / foo()}
Expand All @@ -811,7 +811,7 @@ a {
<===> slash_slash_string/options.yml
---
:todo:
- libsass
- dart-sass
<===> slash_slash_string/input.scss
a {b: 1 / 2 / foo()}
Expand Down Expand Up @@ -1036,7 +1036,7 @@ directory. It just serves to visually separate specs from one another.
<===> top_level/options.yml
---
:warning_todo:
- sass/libsass#2834
- sass/dart-sass#123456
:ignore_for:
- ruby-sass
Expand Down Expand Up @@ -1081,7 +1081,7 @@ declare new variables. Consider adding `$var: null` at the top level.
<===> top_level/options.yml
---
:warning_todo:
- sass/libsass#2834
- sass/dart-sasss#123456
:ignore_for:
- ruby-sass
Expand Down
1 change: 0 additions & 1 deletion lib/cli-args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export interface CliArgs {

const implArgs: Record<string, string[]> = {
'dart-sass': ['--verbose', '--no-unicode', '--no-color'],
libsass: ['--style', 'expanded'],
};

const usageText = `
Expand Down
30 changes: 0 additions & 30 deletions spec/arguments/invocation.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ Error: Positional arguments must come before keyword arguments.
'
input.scss 3:19 root stylesheet

<===> mixin/error/positional_after_named/error-libsass
Error: ordinal arguments must precede named arguments
on line 3 of input.scss
>> @include a($b: 1, 2) {}

------------------^

<===>
================================================================================
<===> mixin/error/duplicate_named/input.scss
Expand All @@ -33,14 +26,6 @@ Error: Duplicate argument.
'
input.scss 3:19 root stylesheet

<===> mixin/error/duplicate_named/error-libsass
Error: parameter $bprovided more than once in call to Mixin a
on line 3:19 of input.scss, in mixin `a`
from line 3:10 of input.scss
>> @include a($b: 1, $b: 2);

------------------^

<===>
================================================================================
<===> mixin/error/duplicate_named_normalization/input.scss
Expand All @@ -56,14 +41,6 @@ Error: Duplicate argument.
'
input.scss 3:21 root stylesheet

<===> mixin/error/duplicate_named_normalization/error-libsass
Error: parameter $b-cprovided more than once in call to Mixin a
on line 3:21 of input.scss, in mixin `a`
from line 3:10 of input.scss
>> @include a($b-c: 1, $b_c: 2);

--------------------^

<===>
================================================================================
<===> function/error/positional_after_named/input.scss
Expand All @@ -78,10 +55,3 @@ Error: Positional arguments must come before keyword arguments.
| ^
'
input.scss 3:14 root stylesheet

<===> function/error/positional_after_named/error-libsass
Error: ordinal arguments must precede named arguments
on line 3 of input.scss
>> $d: a($b: 1, 2);

-------------^
19 changes: 0 additions & 19 deletions spec/core_functions/color/adjust_color/error/args.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,8 @@ Error: Missing argument $color.
'
input.scss 1:7 root stylesheet

<===> too_few/error-libsass
Error: Function adjust-color is missing argument $color.
on line 1 of input.scss
>> a {b: adjust-color()}

------^

<===>
================================================================================
<===> too_many/options.yml
---
:todo:
- sass/libsass#2900

<===> too_many/input.scss
a {b: adjust-color(red, 1)}

Expand All @@ -50,10 +38,3 @@ Error: No argument named $ambience.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===> unknown/error-libsass
Error: Function adjust-color has no parameter named $ambience
on line 1:25 of input.scss
>> a {b: adjust-color(red, $ambience: 10%)}

------------------------^
Loading

0 comments on commit 7516e17

Please sign in to comment.