Detect dependency loops in module migrator#249
Open
pamelalozano16 wants to merge 1 commit intosass:mainfrom
Open
Detect dependency loops in module migrator#249pamelalozano16 wants to merge 1 commit intosass:mainfrom
pamelalozano16 wants to merge 1 commit intosass:mainfrom
Conversation
41d4d36 to
eafcc69
Compare
eafcc69 to
c576719
Compare
jathak
requested changes
Dec 15, 2023
76e48bd to
c594c32
Compare
8592cc3 to
64aaa98
Compare
bbc3981 to
0eab116
Compare
0eab116 to
1cf00cc
Compare
jathak
reviewed
Mar 2, 2026
| @@ -1,3 +1,6 @@ | |||
| ## 2.0.4 | |||
| * Detect dependency loops in module migrator fix. | |||
Member
There was a problem hiding this comment.
I think a clearer way to describe this change to end users is something like:
Previously, migrating certain files with implicit dependencies on one another could create dependency loops. This fixes the migrator to instead error when it encounters these situations, as a working migration is not possible without some sort of manual refactoring.
Also, put this under a "Module Migrator" header
| final Set<ForwardType> forwards; | ||
|
|
||
| /// Dependencies where keys represent source URIs and values represent imported URIs. | ||
| final DependencyGraph _dependencies = DependencyGraph(); |
Member
There was a problem hiding this comment.
Nit: The type here is unnecessary since it can be inferred from the initializer.
Suggested change
| final DependencyGraph _dependencies = DependencyGraph(); | |
| final _dependencies = DependencyGraph(); |
| Error: Dependency loop detected: entrypoint -> library. | ||
| To resolve this issue, consider either of the following: | ||
| 1. Remove the import statement that causes the dependency loop. | ||
| 2. Declare the variables used in the other stylesheet within the same stylesheet. |
Member
There was a problem hiding this comment.
How does this handle functions and mixins?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #137.