Giter Site home page Giter Site logo

Template dependency about topcoder-greed HOT 5 CLOSED

zen0wu avatar zen0wu commented on September 23, 2024
Template dependency

from topcoder-greed.

Comments (5)

wookayin avatar wookayin commented on September 23, 2024

Related to this functionality - the templates that output into the model, not into a file, should be declared before the template that needs the generated model attribute.

For example, the 'source' templates includes a test code which is generated from the 'filetest' template, so we have:

// Working
templates = [ filetest, source ]
// Not working
templates = [ source, filetest ]

I am writing a memo (it should be mentioned anywhere, maybe a documentation just before the public release)

from topcoder-greed.

wookayin avatar wookayin commented on September 23, 2024

Also, 'filetest' should be dependent on 'testcase' -- without it, in vain.

@shivawu, are you planning this on 2.0 or later? I am a bit confused on the behaviour. It'll be great if the dependencies are automatically included.

from topcoder-greed.

zen0wu avatar zen0wu commented on September 23, 2024

Yes, this feature is just an idea which comes to me that day. But I didn't put too much thought into it since it will make the configuration file more complicated (maybe much more).

You're right about the dependencies. And you can see the templates (filetest and testcase) are hooked together by the convention of the name of the testcase template, which is considered bad practice, this name spreads everywhere in the template and config. But I haven't thought of a better idea to express this dependency or restriction, without breaking the config schema too much.

This feature can be added before the release, but it need a lot of design work I think. You can give some advise on this if you'd like.

from topcoder-greed.

zen0wu avatar zen0wu commented on September 23, 2024

what do you guys think of this new syntax? @wookayin @vexorian

Dependencies are defined as an array, which all elements must be satisfied, and each element can be a list of
strings concatenated by | meaning one-of relation between them, so basically it's a logic expression in CNF.
Keys dependencies are expressed as key(xxx).

from topcoder-greed.

vexorian avatar vexorian commented on September 23, 2024

It seems cool.

from topcoder-greed.

Related Issues (20)

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.