-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[monorepo tooling] Convert from taskr to Bazel #14778
Comments
✋ |
@alexeagle I'd love to learn more about what you have in mind! |
Sorry that was a rushed comment yesterday. Hi! I don't mean to make this like a quid-pro-quo; obviously we all want to make our software better within our time constraints. From #9589 (comment) I see that so far, issues affecting Bazel aren't in scope. As an OSS maintainer I get the need to constrain your scope and maybe there are enterprise users who would use their paid support plan to fund the work. But if that doesn't happen, I hope we can still merge some fixes of this kind. We've done a pretty good job (IMO) on rules_nodejs to make nearly all programs behave well under Bazel so I expect there are very few of these fixes needed. (Maybe we can entirely workaround on the Bazel side but you end up with some smelly user config files like https://github.com/bazelbuild/rules_nodejs/blob/3af24495881c02ad38798dda92d9e93e9a1aa0c0/examples/create-react-app/BUILD.bazel#L16-L58 for CRA) As for the OP here,
|
@alexeagle We'd be more than happy to explore fixing the build directory not being writable error for Bazel if we had a access to someone from the Bazel team to collaborate with on it! The enterprise comment was more so referring to if we had to do 100% of the discovery and resolution ourselves, without someone who can point us in the right direction or explain the technical needs (we're not familiar with Bazel). Regarding OP, Each package has its own set of build approaches:
(ordered in assumed difficulty level, hardest to easiest)
SGTM as long as they're generated. |
Cool, I'm playing with it a bit now, but I think we'll need to improve rules_nodejs support for yarn workspaces |
What do you think about moving all the devDependencies to the root package.json? It will be easier to make this work today. In my understanding of yarn workspaces, this doesn't break anything, lets you maintain just one list of these libs and their versions, and of course the individual packages don't need to note their devDeps since it's not relevant in the distribution. Do you know of an advantage in declaring devDeps in the subdir package.json's? Is the canary branch the right code to branch from? Should we have a development branch for this or just keep code in PRs and merge partially-working bits (not interfering with mainline dev until we are ready, of course) We should pick a first milestone. I guess it should be to build an identical release artifact as https://unpkg.com/next@9.4.4/ ? If so my plan would be to first add an npm script that builds both and compares, then we reduce that diff down to zero. |
Dropping some partway-working bits here v9.4.4...alexeagle:bazel#diff-98d8674aa753464c5bc0a56a4b1edce9 |
In terms of incrementalism, I think it could be a quick win to use Bazel for I'd be happy to merge these PRs upstream as you're iterating so you're not chasing a moving target (assuming they somewhat work for a subset of the compiled resources). |
just a ping to keep this alive - it's still on my good-intentions backlog for sometime when extra cycles or a volunteer mentee appear |
Sounds great, thanks! |
Hey @alexeagle I like to volunteer but definitely need a mentee if so happy to help ... btw I am a newbie with Bazel but I like to learn it. |
@asvny thanks for volunteering - I think this will be a hard first Bazel project so I'm not sure where you would start. Also I've had even less time lately than before. Come chat with us in Bazel slack in #javascript and maybe we can figure it out. |
how about I start with an easy one like |
@Timer I would be happy if I can help you with the bazelification 🤓 I want to convert our internal react app to Next.js with MDX and we do everything with bazel. So if you need some help maybe you can outline your roadmap or explain a little bit more in detail. As @alexeagle mentioned maybe in the bazel slack: https://slack.bazel.build |
This is a WIP, there's a bunch of things we'll have to figure out in order to correctly adopt Bazel (will lay them out later). Related: vercel#14778
After doing a proof of concept leveraging Bazel there were too many breaking changes / hacks required to make it work. We've recently switched to leveraging SWC which has massively improved build times, we're also integrating turborepo for persistent caching across build steps. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
We would love to make our monorepo development experience way faster and more ergonomic. It'd be awesome to drop taskr to something like Bazel, or another deterministic build system.
tl;dr replace
yarn dev
in<rootDir>/package.json
w/ BazelThis task isn't for the faint of heart! It'll require a ton of effort.
The text was updated successfully, but these errors were encountered: