feat: determine circular dependency#398
Closed
underfin wants to merge 3 commits into
Closed
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
milesj
reviewed
Dec 27, 2023
milesj
approved these changes
Dec 28, 2023
hyf0
reviewed
Jan 22, 2024
| } | ||
|
|
||
| // Port from https://github.com/rollup/rollup/blob/master/src/utils/executionOrder.ts#L31 | ||
| fn determine_circular_dependency(&mut self) { |
Member
There was a problem hiding this comment.
I feel that we don't need an extra traversal just to checking if there are circles. This should be able to be done during other process.
45b47d5 to
12ca49a
Compare
This was referenced Apr 11, 2024
Member
|
Closed by #830 |
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.

Description
Support warning for circular dependency, here is an example, esbuild is not doing it, it is done by rollup. The warning is important to let the user improve the code quality.
The implement is port from https://github.com/rollup/rollup/blob/master/src/utils/executionOrder.ts#L31, it is easy to compat rollup code(the rollup implement look like is wired, it may have special behavior, so here using it), but the current
sort_modulesfunction can't add the logic, so I add single check function.Test Plan
Added.