Skip to content

Fix passing variables across compilations #367

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ntkme
Copy link
Contributor

@ntkme ntkme commented Mar 11, 2025

@ntkme ntkme force-pushed the fix-variable-across-compilation branch 3 times, most recently from c708151 to 62c3e8a Compare March 11, 2025 17:21
@ntkme ntkme force-pushed the fix-variable-across-compilation branch 2 times, most recently from 32bce7d to ffda07a Compare March 11, 2025 23:20
@ntkme ntkme force-pushed the fix-variable-across-compilation branch from ffda07a to 9970cd2 Compare March 18, 2025 17:05
@ntkme ntkme force-pushed the fix-variable-across-compilation branch from 9970cd2 to b216d0a Compare April 1, 2025 00:46
@ntkme ntkme force-pushed the fix-variable-across-compilation branch from b216d0a to 0c35faf Compare April 26, 2025 17:33
@ntkme ntkme force-pushed the fix-variable-across-compilation branch from 0c35faf to fd2febc Compare April 26, 2025 17:34
@@ -18,6 +18,7 @@ import {Value} from './value';
* execute them.
*/
export class FunctionRegistry<sync extends 'sync' | 'async'> {
public readonly compileContext = Symbol();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document this.

@@ -19,7 +19,18 @@ export class SassArgumentList extends SassList {
* part of the package's public API and should not be accessed by user code.
* It may be renamed or removed without warning in the future.
*/
readonly id: number;
readonly id: number | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document what it means for this to be undefined.

@@ -44,7 +44,7 @@ export class Protofier {
get accessedArgumentLists(): number[] {
return this.argumentLists
.filter(list => list.keywordsAccessed)
.map(list => list.id);
.map(list => list.id as number);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.map(list => list.id as number);
.map(list => list.id!);

Comment on lines +89 to +91
const list = create(proto.Value_ArgumentListSchema, {
id: value.id,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const list = create(proto.Value_ArgumentListSchema, {
id: value.id,
});
const list = create(proto.Value_ArgumentListSchema, {id: value.id});

@@ -1,7 +1,7 @@
{
"name": "sass-embedded",
"version": "1.87.0",
"protocol-version": "3.1.0",
"protocol-version": "3.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the repo is currently in a broken state because sass/sass#4073 was submitted bumping the protocol version, and the repo expects this to match.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix: #372

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.

3 participants