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

Generate deprecations list from the language repo #2253

Merged
merged 9 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/util/initialize/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ runs:
uses: sass/clone-linked-repo@v1
with: {repo: sass/sass, path: build/language}

- name: Generate deprecations from language repo.
run: dart run grinder deprecations
env: {UPDATE_SASS_SASS_REPO: false}
shell: bash

- name: Generate Dart from protobuf
run: dart run grinder protobuf
env: {UPDATE_SASS_SASS_REPO: false}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ node_modules/
/doc/api
/pkg/*/doc/api

# Generated protocol buffer files.
# Generated Dart files.
*.pb*.dart
*.g.dart
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little odd, since the async files are also generated but don't have a marked filename. Might it be simpler to just explicitly ignore the deprecation.dart file?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking in terms of having something to distinguish generated code that's not checked in, and I'd seen the .g.dart pattern with some other Dart projects, but maybe since deprecation.dart is the only file like that here (other than the protobuf files, which use their own extension) just ignoring it explicitly is better.

2 changes: 1 addition & 1 deletion .pubignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This should be identical to .gitignore except that it doesn't exclude
# generated protobuf files.
# generated Dart files.

.buildlog
.DS_Store
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.77.3

### Dart API

* `Deprecation.duplicateVariableFlags` has been deprecated and replaced with
`Deprecation.duplicateVarFlags` to make it consistent with the
`duplicate-var-flags` name used on the command line and in the JS API.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: missing indentation


## 1.77.2

* Don't emit deprecation warnings for functions and mixins beginning with `__`.
Expand Down
4 changes: 2 additions & 2 deletions lib/sass.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'src/async_import_cache.dart';
import 'src/callable.dart';
import 'src/compile.dart' as c;
import 'src/compile_result.dart';
import 'src/deprecation.dart';
import 'src/deprecation.g.dart';
import 'src/exception.dart';
import 'src/import_cache.dart';
import 'src/importer.dart';
Expand All @@ -25,7 +25,7 @@ import 'src/visitor/serialize.dart';

export 'src/callable.dart' show Callable, AsyncCallable;
export 'src/compile_result.dart';
export 'src/deprecation.dart';
export 'src/deprecation.g.dart';
export 'src/exception.dart' show SassException;
export 'src/importer.dart';
export 'src/logger.dart' show Logger;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:meta/meta.dart';
import 'package:source_span/source_span.dart';

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../visitor/any_selector.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/async_compile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'ast/sass.dart';
import 'async_import_cache.dart';
import 'callable.dart';
import 'compile_result.dart';
import 'deprecation.dart';
import 'deprecation.g.dart';
import 'importer.dart';
import 'importer/legacy_node.dart';
import 'importer/no_op.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/async_import_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:package_config/package_config_types.dart';
import 'package:path/path.dart' as p;

import 'ast/sass.dart';
import 'deprecation.dart';
import 'deprecation.g.dart';
import 'importer.dart';
import 'importer/canonicalize_context.dart';
import 'importer/no_op.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/compile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_compile.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: ab2c6fa2588988a86abdbe87512134098e01b39e
// Checksum: 3a29acb9bbced74b5521d789cc58bcfb136f5f7f
//
// ignore_for_file: unused_import

Expand All @@ -20,7 +20,7 @@ import 'ast/sass.dart';
import 'import_cache.dart';
import 'callable.dart';
import 'compile_result.dart';
import 'deprecation.dart';
import 'deprecation.g.dart';
import 'importer.dart';
import 'importer/legacy_node.dart';
import 'importer/no_op.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/embedded/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:path/path.dart' as p;
import 'package:source_span/source_span.dart';
import 'package:stack_trace/stack_trace.dart';

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../logger.dart';
import '../util/nullable.dart';
import '../utils.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/evaluation_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'dart:async';

import 'package:source_span/source_span.dart';

import 'deprecation.dart';
import 'deprecation.g.dart';
import 'logger.dart';

/// An interface that exposes information about the current Sass evaluation.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/functions/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'dart:collection';
import 'package:collection/collection.dart';

import '../callable.dart';
import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../module/built_in.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/functions/math.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'dart:math' as math;
import 'package:collection/collection.dart';

import '../callable.dart';
import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../module/built_in.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/import_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_import_cache.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 4362e28e5cd425786c235d2a6a2bb60539403799
// Checksum: 92f7f488217e46e701434f0cbd9f6f066675c354
//
// ignore_for_file: unused_import

Expand All @@ -16,7 +16,7 @@ import 'package:package_config/package_config_types.dart';
import 'package:path/path.dart' as p;

import 'ast/sass.dart';
import 'deprecation.dart';
import 'deprecation.g.dart';
import 'importer.dart';
import 'importer/canonicalize_context.dart';
import 'importer/no_op.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/importer/filesystem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:meta/meta.dart';
import 'package:path/path.dart' as p;

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../importer.dart';
import '../io.dart' as io;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/js/deprecations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:js/js.dart';
import 'package:pub_semver/pub_semver.dart';

import '../deprecation.dart' as dart show Deprecation;
import '../deprecation.g.dart' as dart show Deprecation;
import 'reflection.dart';

@JS()
Expand Down
2 changes: 1 addition & 1 deletion lib/src/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:meta/meta.dart';
import 'package:source_span/source_span.dart';
import 'package:stack_trace/stack_trace.dart';

import 'deprecation.dart';
import 'deprecation.g.dart';
import 'logger/deprecation_processing.dart';
import 'logger/stderr.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/src/logger/deprecation_processing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:pub_semver/pub_semver.dart';
import 'package:source_span/source_span.dart';
import 'package:stack_trace/stack_trace.dart';

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../exception.dart';
import '../logger.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/src/logger/js_to_dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:source_span/source_span.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:term_glyph/term_glyph.dart' as glyph;

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../logger.dart';
import '../js/deprecations.dart' show deprecations;
import '../js/logger.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parse/scss.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:charcode/charcode.dart';

import '../ast/sass.dart';
import '../deprecation.dart';
import '../deprecation.g.dart';
import '../interpolation_buffer.dart';
import '../logger.dart';
import '../util/character.dart';
Expand Down
6 changes: 3 additions & 3 deletions lib/src/parse/stylesheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:string_scanner/string_scanner.dart';

import '../ast/sass.dart';
import '../color_names.dart';
import '../deprecation.dart';
import '../deprecation.g.dart';
import '../exception.dart';
import '../interpolation_buffer.dart';
import '../logger.dart';
Expand Down Expand Up @@ -235,7 +235,7 @@ abstract class StylesheetParser extends Parser {
case 'default':
if (guarded) {
logger.warnForDeprecation(
Deprecation.duplicateVariableFlags,
Deprecation.duplicateVarFlags,
'!default should only be written once for each variable.\n'
'This will be an error in Dart Sass 2.0.0.',
span: scanner.spanFrom(flagStart));
Expand All @@ -248,7 +248,7 @@ abstract class StylesheetParser extends Parser {
scanner.spanFrom(flagStart));
} else if (global) {
logger.warnForDeprecation(
Deprecation.duplicateVariableFlags,
Deprecation.duplicateVarFlags,
'!global should only be written once for each variable.\n'
'This will be an error in Dart Sass 2.0.0.',
span: scanner.spanFrom(flagStart));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:meta/meta.dart';

import 'ast/selector.dart';
import 'deprecation.dart';
import 'deprecation.g.dart';
import 'evaluation_context.dart';
import 'exception.dart';
import 'utils.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value/calculation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'dart:math' as math;
import 'package:charcode/charcode.dart';
import 'package:meta/meta.dart';

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../callable.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:cli_pkg/js.dart';
import 'package:meta/meta.dart';
import 'package:source_span/source_span.dart';

import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../util/number.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/visitor/async_evaluate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import '../callable.dart';
import '../color_names.dart';
import '../configuration.dart';
import '../configured_value.dart';
import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../extend/extension_store.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/visitor/evaluate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_evaluate.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 116b8079719577ac6e4dad4aebe403282136e611
// Checksum: 3be7e7faec493a34d3570bba5107c399f99304b7
//
// ignore_for_file: unused_import

Expand Down Expand Up @@ -33,7 +33,7 @@ import '../callable.dart';
import '../color_names.dart';
import '../configuration.dart';
import '../configured_value.dart';
import '../deprecation.dart';
import '../deprecation.g.dart';
import '../evaluation_context.dart';
import '../exception.dart';
import '../extend/extension_store.dart';
Expand Down
4 changes: 4 additions & 0 deletions pkg/sass_api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 10.4.3

* No user-visible changes.

## 10.4.2

* No user-visible changes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 10.4.2
version: 10.4.3
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
sass: 1.77.2
sass: 1.77.3

dev_dependencies:
dartdoc: ">=6.0.0 <9.0.0"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.77.2
version: 1.77.3
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down
Loading
Loading