bazel-contrib / SIG-rules-authors

Governance and admin for the rules authors Special Interest Group
https://bazel-contrib.github.io/SIG-rules-authors/
Apache License 2.0
28 stars 12 forks source link

Create a tutorial to help rules authors migrate to bzlmod #86

Open chrislovecnm opened 9 months ago

chrislovecnm commented 9 months ago

This tutorial will focus on how to take a bazel rule set and migrate to using bzlmod. Significant differences and capabilities exist between using a WORKSPACE file and using bzlmod and MODULE.bazel.

Rough draft outline:

Introduction

Migrating to bzlmod

Complexities with bzlmod

@alexeagle @meteorcloudy @rickeylev - any guidance is appreciated!

rickeylev commented 9 months ago

Yeah, that all sounds like a good introduction to creating your own bzlmod-based project.

Something I don't see explicitly mentioned is:

  1. Visibility. This is a part of bzlmod that took me awhile to get a handle on. (I'm not sure I entirely do, still :sweat_smile:, but enough to understand errors enough usually)
  2. Apparent vs canonical repos: when you should or shouldn't use one or the other. A common thing I saw with initial bzlmod work was trying to use canonical repo names more than necessary. Visibility issues go away once you have the canonical name, but doing that probably causes issues in some other context.
  3. The upcoming isolated=True parameter of use_extension, maybe? @fmeum
  4. Change in the runfiles layout
meteorcloudy commented 9 months ago

Thanks for creating this! /cc @Wyverald