> I think [import content from 'xyz'] would be nice, and may be evenI like this idea, but I have absoloutely no idea how to do this :-)
> possible (by merging two AST trees?).
> 3. Command-line arguments as a way to pass parameters (by injectingThis is already supported, but through the environment variable collection rather than as globals (as with Rake). If you call "phantom.exe -a:foo=bar" then you can access this value by using env("foo") from within the script.
> them into AST tree as globals?).
> 4. Build-in logging methods/macros corresponding to different logNot sure I follow what you mean here...could you elaborate?
> levels
> 5. I think transparent support for NAnt/MSBuild tasks would be greatAn interesting idea but not sure how feasilble this would be. I'd rather focus on providing Phantom equivalents to the commonly used tasks rather than trying to support a mini nant/msbuild runtime.
> 6. Finally, msbuild has a really nice support for detecting whetherIt's been a long time since I did any work with msbuild directly and I don't recall ever making use of this...do you have a link to more information about this?
> the target should be run by comparing timestamps of the inputs to the
> timestamps of the outputs.
1. Target dependency syntax.
I think I'll probably look into this next. I see one possible problem
with 'after', however.
It seems to imply that this task will be immediately run after the
dependencies, which is not true (task will not run unless it is said
to run or some other depends on it).
It is interesting that MSBuild 4 has BeforeTargets and AfterTargets
which explicitly specify when a target should be run (in addition to
normal dependency syntax).
I think right now I prefer something like 'target build requires
(release, publish)'. What do you think?
2. File inclusion
Mostly done, I am noticing some strange issues caused by RhinoDsl
approach to caching, will look into fixing them.
3. Command-line arguments as a way to pass parameters
Current parameter passing method (env()) strikes me as dangerous since
env variables should by the OS rules be passed to the spawned
processes.
I have not experimented with it, but I do not see a benefit of using
environment vars either, except for Rake legacy, which is not well
known to most of .NET devs.
One thing that I am missing with current parameter mechanism is that
it is hard to make a certain parameter required (with validation by
the framework).
On the other hand, parameter may be required only by a certain target,
which makes injecting a global meaningless, since the compilation will
fail even if target is not run.
I do not yet have a complete idea of what is the best solution, but
some kind of parameter requirement specification by the target would
be great.
I am trying to find a solution that will not overcomplicate things
while being similar to NAnt <property> in flexibility.
4. Build-in logging methods/macros corresponding to different log
levels
Ok, this basically comes to the need of a configurable multilevel
logger used by tasks through the base task.
Logger is generally a good thing because it allows, for example, for
XML build reports/Colored console reports/etc.
I would say that if a logger is implemented, a nice thing to do would
be to make
NAnt-Phantom logger adapter (to use any existing loggers written for
NAnt)
and
Phantom-NAnt logger adapter (for 'import tasks from', so the task
logging could be transparent within Phantom logging system).
I understand that it is a lot of work. I'll look into it if I have
some free time.
5. I think transparent support for NAnt/MSBuild tasks
Done for NAnt, not hard to do for MSBuild, will look into it when time
allows.
6. Really nice support for detecting whether the target should be run
by comparing timestamps of the inputs to the timestamps of the outputs
Not sure about that one, needs more thought on my part.
—
Andrey
On Dec 13, 3:47 pm, Andrey Shchekin <ashm...@gmail.com> wrote:
> Hi Jeremy,
> Thanks for the answer,
>
> > > I think [import content from 'xyz'] would be nice, and may be even
> > > possible (by merging two AST trees?).
>
> > I like this idea, but I have absoloutely no idea how to do this :-)
>
> Ok, I'll try this.
>
> > 3. Command-line arguments as a way to pass parameters (by injecting
> > > them into AST tree as globals?).
>
> > This is already supported, but through the environment variable collection
> > rather than as globals (as with Rake). If you call "phantom.exe -a:foo=bar"
> > then you can access this value by using env("foo") from within the script.
>
> I think having a function is more reasonable than a global (or not? having a
> global has a benefit of crashing when it is required but not set. not sure).
> But do these environment variables propagate to processes spawned by build
> process? If yes, then it may lead to undesired side-effects.
>
> > 4. Build-in logging methods/macros corresponding to different log
> > > levels
>
> > Not sure I follow what you mean here...could you elaborate?
>
> I can do "print", but both NAnt and Msbuild has different log levels
> configurable through command line arguments.
> For example, for MSBuild it is *q[uiet]*, *m[inimal]*, *n[ormal]*, *
> d[etailed]*, and *diag[nostic].*