Archive for April, 2012

New Run Syntax

Apr 17

I came up with a new run syntax that I like:

Task.Run.Zip(x=>x.Compress.SourceFile(“test.dll”).OutputTo(“test.zip”));
Task.Run.Executable(x=>x.PathToExecutable(“test.exe”));

Due to the scope of the change (and the fact that I have not switched to git yet), I have committed this code but there are still a lot more changes to be polished (and some namespace moves still to be done). I hope to have some time for further refinement and a ton of cleanup after this change in the coming week.

Filed Under: FluentBuild

New Run Syntax Feedback

Apr 12

I have completed the new build sytax of Task.Build(Using.[Compiler].[Options]); which I like way better than the old syntax. It is a bit annoying to have a few extra brackets but already makes it easier to use to me. I liked it so much that I started applying this to the Run syntax but that is where I found things did not work as well. I figured I would throw out the syntax ideas I had and see what people thought:

 
Option One: Generic run method
+simple to use
+expandable
-need to know what can be run (might be in one namespace)
-how do you handle executable return codes? (or other result objects)

Task.Run(Zip.Compress.SourceFile(“tests.dll”).UsingCompressionLevel.Ten);
Task.Run(Zip.Decompress.SourceFile(“tests.zip”));
Task.Run(Executable.Path(“test.exe”));
Task.Run(Debugger);
Task.Run(Nunit.Assembly(“tests.dll”));
Task.Run(MsTest.Assembly(“tests.dll”));

Option Two: Run narrows down choices then builders are used as arguments
+simple to use
+lets you know options available
+Allows for return codes for items that require it (or other result objects)
-much more language required to learn

Task.Run.Zip(Compress.SourceFile(“tests.dll”).UsingCompressionLevel.Ten);
Task.Run.Zip(Decompress.SourceFile(“tests.zip”));
Task.Run.Executable(Executable.Path(“test.exe”));
Task.Run.Debugger();
Task.Run.UnitTestFramework(Nunit.Assembly(“tests.dll”));
Task.Run.UnitTestFramework(MsTest.Assembly(“tests.dll”));
Option Three: Run narrows down choices to the most narrow point then builders are used as arguments
+simple to use
+lets you know options available
+Allows for return codes for items that require it (or other result objects)
+Intellisense would only give you one option for the arg to pass in
-Bit more verbose with the “Options” builders

Task.Run.Zip.Compress(CompressOptions.SourceFile(“tests.dll”).UsingCompressionLevel.Ten);
Task.Run.Zip.Decompress(DecompressOptions.SourceFile(“tests.zip”));
Task.Run.Executable(Executable.Path(“test.exe”));
Task.Run.Debugger();
Task.Run.UnitTestFramework.Nunit(NunitOptions.Assembly(“tests.dll”));
Task.Run.UnitTestFramework.MsTest(MsTestOptions.Assembly(“tests.dll”));
Option Four: Have a runners factory class that creates the builders
-need to know to do Runners.
+always know where to start (once you know to use Runners.
+simple syntax
-How do you handle executable return codes? (or other result objects)

Task.Run(Runners.Zip.Compress.SourceFile(“tests.dll”).UsingCompressionLevel.Ten);
Task.Run(Runners.Zip.Decompress.SourceFile(“tests.zip”));
Task.Run(Runners.Executable.Path(“test.exe”));
Task.Run(Runners.Debugger);
Task.Run(Runners.Nunit.Assembly(“tests.dll”));
Task.Run(Runners.MsTest.Assembly(“tests.dll”));

Let me know your thoughts or give me other options to make this simple and intuitive!

Filed Under: FluentBuild

The Update

Apr 9

Well my life has been busy with lots of personal drama. Hopefully that is all behind me now. I have really lost the urge and drive to blog (plus being crazy busy does not help). For the future I am going to be focusing posts on some of my open source work. Namely FluentBuild and FluentFilesystem.

FluentBuild, is my open source fluent interface around doing builds. It has been coming along as I get time and it is almost to a place that I like it. I found the filesystem interface really became its own beast so I am spinning that off into its own library (https://github.com/GotWoods/FluentFs). I have a few remaining beefs with FluentBuild:

1) Having to append .Execute() to the end of a lot of the tasks. I always forget and I wrote the damn thing. I will be changing the interface around to more of a Task.Build(details go in here); I am thinking. This should make things simpler to me.

2) The calling out to external executables (which happens a lot) is not where I want it to be at. I am trying to find some time to revise this. My goal is to have a set of injectable processors that can analyze the output from the executable and determine what to do. This will allow for more fine grained control over how output is dealt with. Most of this should be transparent to the user but it will of course be extendable and simple to use.

 

So the roadmap to me is this:

  1. Now that FluentBuild and FluentFS is split I need a way to merge it all back simply so that users are not dependent on two projects. It also guarantees compatibility.
  2. Possibly migrating to github (I enjoyed the experience with FluentFS so FluentBuild may get migrated as well)
  3. Removing the need for .Execute() on methods
  4. Reworking the executable callouts.

So lots of work ahead of me on this but getting closer to what I want it to do. I have been using it on several projects and I feel that it is getting closer to a release.

I would like to thank all the people who have given feedback, patches, and bug reports for the project!

Filed Under: General