Skip to content

Commit

Permalink
Fix a bug with implicit dependencies (#1348)
Browse files Browse the repository at this point in the history
Encountered this while migrating internal code to math.div
  • Loading branch information
jathak committed Jun 8, 2021
1 parent af816d0 commit 7545011
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## 1.34.2

* Fix a bug that could prevent some members from being found in certain files
that use a mix of imports and the module system.

## 1.34.1

* Fix a bug where `--update` would always compile any file that depends on a
Expand Down
13 changes: 10 additions & 3 deletions lib/src/async_environment.dart
Expand Up @@ -210,12 +210,19 @@ class AsyncEnvironment {
/// Returns a new environment to use for an imported file.
///
/// The returned environment shares this environment's variables, functions,
/// and mixins, but not its modules.
/// and mixins, but excludes most modules (except for global modules that
/// result from importing a file with forwards).
AsyncEnvironment forImport() => AsyncEnvironment._(
{},
{},
{},
{},
{
for (var module in _globalModules)
if (module is ForwardedModuleView) module
},
{
for (var entry in _globalModuleNodes.entries)
if (entry.key is ForwardedModuleView) entry.key: entry.value
},
null,
null,
null,
Expand Down
15 changes: 11 additions & 4 deletions lib/src/environment.dart
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_environment.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 588f0864bb1f889586178c799d91696341ecf218
// Checksum: 0411d2d782920c2d8293eacf178941c192670e75
//
// ignore_for_file: unused_import

Expand Down Expand Up @@ -217,12 +217,19 @@ class Environment {
/// Returns a new environment to use for an imported file.
///
/// The returned environment shares this environment's variables, functions,
/// and mixins, but not its modules.
/// and mixins, but excludes most modules (except for global modules that
/// result from importing a file with forwards).
Environment forImport() => Environment._(
{},
{},
{},
{},
{
for (var module in _globalModules)
if (module is ForwardedModuleView) module
},
{
for (var entry in _globalModuleNodes.entries)
if (entry.key is ForwardedModuleView) entry.key: entry.value
},
null,
null,
null,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: sass
version: 1.34.1
version: 1.34.2-dev
description: A Sass implementation in Dart.
author: Sass Team
homepage: https://github.com/sass/dart-sass
Expand Down

0 comments on commit 7545011

Please sign in to comment.