-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
[RFC] Make infection easier to debug #1111
Comments
Random thoughts
And the main (from my POV) point is
|
Yes totally, I was thinking of something along the lines of making it point to
Not sure to understand the comment: dot files/directories are a common pattern. We already have
I guess it gets cleared eventually yeah. But it's not immediate either, so in any case we need to clean up after a run. My main beef here is UX: you have the logs giving you the commands, but can't use them easily because the files are gone. But maybe this does not need to be systematic and could be done only with Also in case it wasn't clear: I don't mean we keep everything between two runs: a new run will wipe out the content of
But those tmp files are not meant to be re-used or inspected by an end-user like in our case. I'm not following the RAM issue though |
command line is added to log file only with
I'm not sure I got it. RAM is not an issue. Using Anyway, if users want to inspect the files, they need
Having them in Probably, as an idea, we can add a question to ConfigureCommand to ask people where they want to locate files, as well as providing info that files are stored only with |
Let's think you want Infection to make a report for users to copy-n-paste, in case, for example some unknown error happens, or some fairly common error like "class not found" when coverage files are out of sync. And therefore you would want to accept and handle all exceptions on one place. If you think about, it'll make many difficulties we have with error handling and exceptions (it appears #1107 is there to work around them) much less of a problem. Say, now you have a With all fairness, this is a valid approach when you want things done, but if you'd have every exception or error handled in one place, you can handle related tasks right here too. Say, what to show a user if a certain exception happened? You know it, and you have all the context, name of the framework, files, locations, etc. An exception object doesn't even need to care. |
@sanmai I'm sorry I've read it 3 times and even thought it was posted to not correct issue Could you please provide any examples supporting your message? I don't follow how this RFC solves what you described. Aren't we discussing just moving log files from |
At its core I find infection quite hard to debug for a number of reasons, here is a non-exhaustive list
--debug
--log-verbosity
--verbose
I also aim to remove the need to require the configuration file in the future. For now those efforts are halted because of
Configuation::getSrcDirs()
used for Codeception (/cc @maks-rafalko). However even if resumed, it's imperative to have a way to know what was the config values. We already have a few "inferred" values, which are resolved between the config file and the command line options, and with a configuration-less config, there's only going to be a lot more of them. I think I could take from the approach I used with Box for that.I would like to work on the different points above in the near future. I don't think there is much that is going to cause controversy in there, except for one main point which I would like to discuss now with you.
I think we should drop the idea of dumping temporary files in a temporary directory. Instead I would propose to dump everything in a
.infection
directory. The benefits are:A downside is that it requires users to add
.infection
to their.gitignore
, but given that PHPUnit itself recently requires so with the cache file, I think it's an acceptable trade-off. WDYT?The text was updated successfully, but these errors were encountered: