Giter VIP home page Giter VIP logo

casper's People

Contributors

eatdrinksleepcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

casper's Issues

Allow full path to task from command line

Tasks with the same name in different imported projects are currently resolved via "first in wins", which is not intuitive. Instead, require specifying the full "path" to the task (i.e. the delimited list of project names) for all tasks.

Consider adding Boo macros for task configuration to simulate "receiver"

Currently, task configuration is typically done via constructors, using Boo's version of object initializers:

task Pack(Exec,
  Executable: 'nuget.exe')

This essentially requires all task configuration to be done within a single expression which can get unwieldy. It would be great if we could do task configuration within a closure, which would allow each configuration entry to be its own statement:

task Pack(Exec):
  Executable = 'nuget.exe'

However, because Boo does not have the concept of function "receivers" (what Groovy would refer to as a "delegate"), the "Executable" identifier in this example cannot be resolved, resulting in a compiler error. An instance of the task would have to be passed in as a parameter, and code in the function would have to refer to the task explicitly:

task Pack(Exec):
  task.Executable = 'nuget.exe'

This is not much different - and arguably not even any better - than not even using a closure, but configuring the task directly:

task Pack(Exec)
Pack.Executable = 'nuget.exe'

But while this works and is highly flexible, it fails to create a natural structure in the build script, and is also quite redundant. Both of these factors hurt script readability.

One option to consider would be creating Boo macros for the major built-in tasks. A reference to the task parameter could then be injected automatically:

task Pack(Exec):
  executable 'nuget.exe'

While this comes very close to emulating our desired form, it requires a macro to be written for every property of every task, which is a lot to maintain. It would also be more to understand and more work for custom task authors. But IF we think that Boo will ultimately implement some form of receiver functions, this could be a temporary stepping stone to our desired end state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.