Mono-D icon indicating copy to clipboard operation
Mono-D copied to clipboard

A Dustmite Option - For those projects that are just a bit too large

Open Orvid opened this issue 11 years ago • 11 comments

There should be a button that I can click that will let me run dustmite over the current project, optionally including all projects in the solution, so that it's much easier to reduce test-cases in large code bases.

Orvid avatar Mar 20 '14 02:03 Orvid

/me doesn't know what Dustmite is again even after the 100th time of having it named somewhere

aBothe avatar Mar 20 '14 08:03 aBothe

let me google it for you: https://github.com/CyberShadow/DustMite

On Thu, Mar 20, 2014 at 9:29 AM, Alexander Bothe [email protected]:

/me doesn't know what Dustmite is again even after the 100th time of having it named somewhere

Reply to this email directly or view it on GitHubhttps://github.com/aBothe/Mono-D/issues/456#issuecomment-38144141 .

extrawurst avatar Mar 20 '14 08:03 extrawurst

It's worth noting that dub is likely getting dustmite integration, so perhaps this would not be as useful then when there's already an alternative.

Kapps avatar Apr 17 '14 02:04 Kapps

Even better - although 'native' mono-d projects could still get a custom dustmite binding. Could anyone of you point me a good & easy to remember location in Mono-D's Gui where dustmite should be integrated? I mean, should it be run before building a project, or as a 'Tools'->'D'-item that is unlikely to become found by new users?

aBothe avatar Apr 17 '14 08:04 aBothe

Dustmite would best be shown on the right-click menu for each project. There also needs to be an extra option that I didn't have in the original issue, namely that the user should be able to choose which referenced projects should have their source included in the dustmite invocation. There should also be an option to include the full sources of phobos and druntime in the invocation, which would mean it would be possible to do a complete reduction, something that is essential when creating a test for a bug report for a compiler error.

On 4/17/14, Alexander Bothe [email protected] wrote:

Even better - although 'native' mono-d projects could still get a custom dustmite binding. Could anyone of you point me a good & easy to remember location in Mono-D's Gui where dustmite should be integrated? I mean, should it be run before building a project, or as a 'Tools'->'D'-item that is unlikely to become found by new users?


Reply to this email directly or view it on GitHub: https://github.com/aBothe/Mono-D/issues/456#issuecomment-40693626

Orvid avatar Apr 17 '14 12:04 Orvid

Aka extra dialog with some text boxes that take both arguments as well as module directories to include, whereas in the latter, 'recommedend' aka all kinds of include paths for this project will be enlisted by default.

aBothe avatar Apr 17 '14 12:04 aBothe

yep

On 4/17/14, Alexander Bothe [email protected] wrote:

Aka extra dialog with some text boxes that take both arguments as well as module directories to include, whereas in the latter, 'recommedend' aka all kinds of include paths for this project will be enlisted by default.


Reply to this email directly or view it on GitHub: https://github.com/aBothe/Mono-D/issues/456#issuecomment-40709577

Orvid avatar Apr 17 '14 13:04 Orvid

Now that I'm reading the tutorial on how to use it: Where are the manipulated files are stored? In xyz.reduced as explained in "The reduced tree will be in path/to/directory.reduced"

aBothe avatar Apr 17 '14 13:04 aBothe

You have to copy the files you want to test into a new directory, everything in that directory will be reduced.

On 4/17/14, Alexander Bothe [email protected] wrote:

Now that I'm reading the tutorial on how to use it: Where are the manipulated files are stored? In .reduced as explained in "The reduced tree will be in path/to/directory.reduced"


Reply to this email directly or view it on GitHub: https://github.com/aBothe/Mono-D/issues/456#issuecomment-40713523

Orvid avatar Apr 17 '14 13:04 Orvid

I just tried to run dustmite: It 'reduced'

module test;
import std.stdio;

void main()
{
    int a = 1234;
    writeln("hello world");
    stdin.readln();
}

to

void main()
{
}

Kinda useful cough

Anyway, the command I used for accomplishing this was dustmite dtest 'dmd test', the resuting file was stored under ´dtest.reduced´.

Just one side question: If there are program resources like string templates and other binary resources like images that definitely must not be touched while compiling, what if the project file is seen as resource file, too? This would mean that it doesn't matter whether I copied all project files to an other directory or left them right in the original place.. Of course I'd have to clean all intermediate object files first, but that's a way less complicated task to do

aBothe avatar Apr 19 '14 12:04 aBothe

It reduced that to that because that's all that it could do while the command you passed it dmd test still returned 0.

Orvid avatar Apr 19 '14 17:04 Orvid