Git Product home page Git Product logo

Comments (5)

llogiq avatar llogiq commented on June 7, 2024

I guess you could reference matklad's post on the topic unless you really want to write your own take.

from hypher.

djc avatar djc commented on June 7, 2024

I was definitely going to mention matklad as the inspiration since I originally got the idea from steveklabnik/semver-parser#50, but I think the post you linked to underemphasizes that people should avoid build scripts where possible, and overemphasizes the idea of magic code insertion, where in my experience just generating code into a directory hierarchy in src works well and maybe even better for most of the cases I've encountered (so far I've contributed changes like this to about 5 or 6 projects).

from hypher.

laurmaedje avatar laurmaedje commented on June 7, 2024

Thanks for the kind words! I'll have a look at this soon.

from hypher.

laurmaedje avatar laurmaedje commented on June 7, 2024

@djc I see where you're coming from, but it's kind of painful. I just attempted this and the code-generating test doesn't compile because the crate does not build without the generated code. Is there a typical workaround for this? In general, I share the sentiment not to inflict unnecessary bloat on the downstream users, but I'm not sure if the win is that big here, as hypher's build process does not have any dependencies.

from hypher.

djc avatar djc commented on June 7, 2024

I usually commit the generated code in the repo. If you accidentally botch some part of the code generation process such that the generated code doesn't build, I usually just comment out a bunch of stuff to make it work again. In my experience, the code generation code doesn't change very often so it's not a big deal -- IMO it's worth not inflicting the extra compile time on downstream users (even without extra dependencies).

from hypher.

Related Issues (10)

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.