How to write a simile gen rule in Bazel

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025

Комментарии • 11

  • @j4watt6er
    @j4watt6er Год назад +1

    This is great! From what I’m starting to understand about Bazel, wouldn’t you want to go ac step father and wrap that genrule in a macro so that it looks like a rule when you use it? Like, combine() would be a macro that passes off to the genrule()?

    • @gisli
      @gisli  Год назад

      Thanks!
      The gen rules are pretty interesting tbh. I just recently figured out how to use them and they are great for small simple things. But I think in most cases once the use case is a little bit more complex (where you start thinking about writing a macro for example) its probably better to write a custom rule that just exactly what you need instead of wrapping the gen rules
      But I might be wrong :), I still haven't really introduced bazel as a critical part of my studios infrastructure so maybe there are considerations that I haven't seen

  • @elganzandere
    @elganzandere Год назад +1

    What's going on with Arctic Theory & the forthcoming title?

    • @gisli
      @gisli  Год назад

      Hey 🙂 we are still working hard towards the closed alpha of Pioneers of New Dawn next year. Everything is clicking into place and the core systems are falling into place
      We’ll release some news on the mailing list in the coming weeks
      www.arctictheory.com/pond

  • @farzadmf
    @farzadmf Год назад +1

    Please do more Bazel videos (pre-beginner to please :) ). In my previous company, we started to use Bazel and I was always like WTH is happening here?!!

    • @gisli
      @gisli  Год назад +2

      Thanks for your comment, I’m glad it’s helpful, I really like making content about the fundamentals to try and get people to understand rather than just follow along 🙂

    • @farzadmf
      @farzadmf Год назад +1

      Yes, I agree. One super useful video/series for me personally would be to add Bazel to an existing project, showing how to create the workspace file, the individual build files etc.

    • @gisli
      @gisli  Год назад

      That a good idea. I tried to show off setting up a project from scrach in one of my other videos but I think it would be cool to migrate a project over to bazel
      Do you have any suggestions for a project? maybe a (relatively simple) open source project

    • @farzadmf
      @farzadmf Год назад

      Hmmm, I didn't expect the question, so I have to think 😆.
      Not sure honestly which open source project is "simple" because most of the repos I visit almost regularly (libraries, etc.) are "big", but I'll definitely keep an eye.
      But that would be SUPER COOL if it's implemented in an existing "real" project

  • @gerald5335
    @gerald5335 Год назад +1

    Labels
    //absolute/path/to:target
    relative/path/from/BUILD/to/subpackage:target

    • @gisli
      @gisli  Год назад

      Thanks for the clarification, I'm still getting the hang of the finer details