Skip to content

Commit eb18526

Browse files
authored
Use the embedded protocol from the Sass language repo (#1966)
1 parent cb039c7 commit eb18526

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.github/util/initialize/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ runs:
2626
- uses: bufbuild/[email protected]
2727
with: {github_token: "${{ inputs.github-token }}"}
2828

29-
- name: Check out embedded Sass protocol
29+
- name: Check out the language repo
3030
uses: sass/clone-linked-repo@v1
31-
with: {repo: sass/embedded-protocol, path: build/embedded-protocol}
31+
with: {repo: sass/sass, path: build/language}
3232

3333
- name: Generate Dart from protobuf
3434
run: dart run grinder protobuf

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,14 @@ jobs:
162162
uses: sass/clone-linked-repo@v1
163163
with: {repo: sass/embedded-host-node}
164164

165-
- name: Check out the JS API definition
165+
- name: Check out the language repo
166166
uses: sass/clone-linked-repo@v1
167-
with: {repo: sass/sass, path: language}
167+
with: {repo: sass/sass, path: build/language}
168168

169169
- name: Initialize embedded host
170170
run: |
171171
npm install
172-
npm run init -- --protocol-path=../build/embedded-protocol \
173-
--compiler-path=.. --api-path=../language
172+
npm run init -- --compiler-path=.. --language-path=../build/language
174173
npm run compile
175174
mv {`pwd`/,dist/}lib/src/vendor/dart-sass
176175
working-directory: embedded-host-node
@@ -185,7 +184,7 @@ jobs:
185184
fi
186185
187186
- name: Run tests
188-
run: npm run js-api-spec -- --sassPackage ../embedded-host-node --sassSassRepo ../language
187+
run: npm run js-api-spec -- --sassPackage ../embedded-host-node --sassSassRepo ../build/language
189188
working-directory: sass-spec
190189

191190
dart_tests:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Dart Sass includes an implementation of the compiler side of the [Embedded Sass
316316
protocol]. It's designed to be embedded in a host language, which then exposes
317317
an API for users to invoke Sass and define custom functions and importers.
318318

319-
[Embedded Sass protocol]: https://github.com/sass/sass-embedded-protocol/blob/master/README.md#readme
319+
[Embedded Sass protocol]: https://github.com/sass/sass/blob/main/spec/embedded-protocol.md
320320

321321
### Usage
322322

buf.work.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version: v1
2-
directories: [build/embedded-protocol]
2+
directories: [build/language/spec]

tool/grind.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,16 @@ void main(List<String> args) {
5858
"${pkg.githubReleaseNotes.defaultValue}";
5959

6060
pkg.environmentConstants.fn = () {
61-
if (!Directory('build/embedded-protocol').existsSync()) {
61+
if (!Directory('build/language').existsSync()) {
6262
fail('Run `dart run grinder protobuf` before building Dart Sass '
6363
'executables.');
6464
}
6565

6666
return {
6767
...pkg.environmentConstants.defaultValue,
68-
"protocol-version":
69-
File('build/embedded-protocol/VERSION').readAsStringSync().trim(),
68+
"protocol-version": File('build/language/spec/EMBEDDED_PROTOCOL_VERSION')
69+
.readAsStringSync()
70+
.trim(),
7071
"compiler-version": pkg.pubspec.version!.toString(),
7172
};
7273
};
@@ -202,7 +203,8 @@ dart run protoc_plugin "\$@"
202203
}
203204

204205
if (Platform.environment['UPDATE_SASS_PROTOCOL'] != 'false') {
205-
cloneOrCheckout("https://github.com/sass/embedded-protocol.git", "main");
206+
cloneOrCheckout("https://github.com/sass/sass.git", "main",
207+
name: 'language');
206208
}
207209

208210
await runAsync("buf",

0 commit comments

Comments
 (0)