[
https://issues.apache.org/jira/browse/BUILDR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627378#action_12627378
]
Ittay Dror commented on BUILDR-142:
-----------------------------------
Then notion of tasks is prevalent as an implementation detail. But to an end
user, what he sees in buildfile is the notion of projects. There's no mention
in the buildfile of tasks, just configuration, and specifically no mention of
'build'.
The user sees a project named 'bar' inside 'foo' which only contains a line
like 'compile.with :log4j'. Now saying he should use 'buildr foo:bar:build' to
compile it is breaking the abstraction of the buildfile.
I have been developing with buildr for two months now and only now opened this
issue not because it was confusing to me, but because it was confusing to my
end users. They don't develop the buildfile or extensions, just read it and
maybe tweak it a bit. So they don't realize that buildr is based on rake and
that everything is a task. To them everything is a project. They make the same
mistake of 'buildr <project name>', expecting the project to be built, even
after being explained it is not the way (and opening bugs when it doesn't work).
> Allow running project tasks from a top directory in the same way as after
> 'cd' to the project's base dir
> --------------------------------------------------------------------------------------------------------
>
> Key: BUILDR-142
> URL: https://issues.apache.org/jira/browse/BUILDR-142
> Project: Buildr
> Issue Type: New Feature
> Components: Core features
> Affects Versions: 1.3.2
> Reporter: Ittay Dror
> Assignee: Victor Hugo Borja
> Fix For: 1.3.3
>
> Attachments: 0001-rspec-for-p-switch.patch,
> 0002-added-p-switch.patch,
> 0003-allow-project-names-with-path-separators.patch,
> 0004-list-project-names-with-file-separator.patch
>
>
> Currently, to run a specific project's tasks, there are two alternatives:
> 1. cd to the project's base dir and run 'buildr' or 'buildr <tasks>'.
> 2. run 'buildr <project name>:<task1> <project name>:<task2>'
> The first one requires 'cd' and is not comfortable to run from an IDE. The
> second one is verbose, cannot rely on default tasks and is confusing to new
> users.
> Users usually expect the behavior as in 'make' or 'tar'. That is, a switch
> (usually -C) that first does a 'cd' for you and then continues to run as
> usual. This is an issue I'm faced with right now. People are confused when I
> tell them to run 'buildr top_project:sub_project:build'. Also, people don't
> think of projects as tasks. This is an implementation detail of Buildr, not
> something that people comprehend intuitively (at least my users)
> Moreover, several projects may share the same base directory (I intend to use
> this to compile the same source tree with different configurations), so a
> 'cd' will cause both to compile.
> Suggestion: add a '-p' switch that tells buildr the "local project" to use
> when running. Then users simply invoke 'buildr -p top_project:sub_project'
> and all default tasks run.
> Suggestion 2: since project names will usually correspond with a directory
> layout, allow to specify them with File::SEPARATOR. this way, command line
> completion is easy (especially in windows).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.