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

Shouldn't detectCycles check ignore packages that are ignored with --exclude option? #115

Open
vvscode opened this issue Sep 19, 2023 · 4 comments

Comments

@vvscode
Copy link

vvscode commented Sep 19, 2023

wsrun discovered cycle dependencies in my project (many thanks), but I do not see any way to run command before I complete refactoring (not a peace of cake).

I would expect detectCycles check ignores packages from exclude list, but it doesn't. Is it on purpose? or just didn't think about his case?

Packages that have cycle deps are not affected with a command run, but the fact just completely stops using wsrun for me

Thanks in advance

@spion
Copy link
Collaborator

spion commented Sep 20, 2023

We made the decision early on not to support cycles at all as ensuring that the current implementation doesn't end up in an endless loop was otherwise too difficult.

In the current implementation, exclude does not also imply "exclude dependencies", so the dependencies of the package are still considered. A refactoring that separates the planning stage from the execution stage would make what you ask for possible.

@vvscode
Copy link
Author

vvscode commented Sep 21, 2023

@spion if I understand correctly it's about getting wsrun stack. Did you discuss the case when you disable cycle detection, but put maximum time for processing (if it did not complete in X seconds you just exist process with an error about cycles)?

@spion
Copy link
Collaborator

spion commented Sep 21, 2023

There would be no timeout as the entire process would very likely be stuck CPU processing.

Even if we found a way to avoid that, using a timeout is error prone. Some processes take a long time, others don't, yet others take variable amount of time (for example, a fist non-incremental compile taking a minute VS second incremental compile taking a second).

@vvscode
Copy link
Author

vvscode commented Sep 22, 2023

ok

Why can't we just check if in cycle-chain (that is currently printed) there is no excluded package? (and if yes - we just skip this check)

Or it's more complex process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants