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

Feature to set max waves for run #1426

Open
rubiesonthesky opened this issue Mar 13, 2024 · 7 comments
Open

Feature to set max waves for run #1426

rubiesonthesky opened this issue Mar 13, 2024 · 7 comments
Labels
status: in discussion Not yet ready for implementation or a pull request

Comments

@rubiesonthesky
Copy link
Collaborator

🚀 Feature Request

I'm trying to check if typestat could help enabling strict Typescript for my project. Currently it's messing up every file really weird way. For debugging this, I think it would be nice to be able to say that typestat should only do 10 waves and then complete.

I tried to read all the documentation but I did not spot this kind of setting.

Existing Behavior

Tool will just run infinitely (probably).

Change Proposal

Add cli flag or option in the config file, where user could set maximum waves that will be run.

@rubiesonthesky
Copy link
Collaborator Author

This is off topic for this feature request, but typestat is currently doing this kind of changes

-import {SearchApiService} from '../services/search-api.service';
+import {SearchApiService} from '../service | List<T>s/search-api.service';

@JoshuaKGoldberg
Copy link
Owner

This is off topic for this feature request, but typestat is currently doing this kind of changes

-import {SearchApiService} from '../services/search-api.service';
+import {SearchApiService} from '../service | List<T>s/search-api.service';

Yup that would be a good separate bug issue to file please 😁

@JoshuaKGoldberg
Copy link
Owner

Tool will just run infinitely (probably).

There should be detection of infinite waves (#1055 -> #1056). If you have a case where that detection isn't kicking in, do you think you could post a repro please?

The concept of "waves" is pretty implementation-detail-y, to the point where I don't think it's ideal to expose it to users. Ideally the tool would detect any bad cases & automatically bail out instead. So if we can figure out a fix to auto-detection logic in your case, that'd be nice.

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Mar 13, 2024
@rubiesonthesky
Copy link
Collaborator Author

For me the problem was not really that it would be infinite run. I did not let it run so long. But the fixed it was doing were incorrect and it started to throwing a lot errors.

So I think what you are saying about bailing out, would make more sense for my case I think.

@JoshuaKGoldberg
Copy link
Owner

Can you post the project / a way for me to reproduce this?

@rubiesonthesky
Copy link
Collaborator Author

@JoshuaKGoldberg I’ll try to check some details later. It’s a private repository so I can’t share it. But I'll test it again and I'll open bug report.

It may be possible that I can screen share or something with you, if this is reproductive. :)

@JoshuaKGoldberg JoshuaKGoldberg added status: in discussion Not yet ready for implementation or a pull request and removed status: waiting for author Needs an action taken by the original poster labels Apr 1, 2024
@JoshuaKGoldberg
Copy link
Owner

Adding status: in discussion per #1491. Some good points there around making commits...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in discussion Not yet ready for implementation or a pull request
Projects
None yet
Development

No branches or pull requests

2 participants