-
Notifications
You must be signed in to change notification settings - Fork 62
Migrate to Bzlmod #428
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
base: main
Are you sure you want to change the base?
Migrate to Bzlmod #428
Conversation
These flags enable seeded synthesis runs, allowing users to introduce controlled variability to help explore the space of valid solutions.
Adds the copyright header & default license Conflicts: verilator/settings/BUILD.bazel
Conflicts: dependency_support/edu_berkeley_abc/bundled.BUILD.bazel
Conflicts: dependency_support/edu_berkeley_abc/bundled.BUILD.bazel
…#395) * Add missing genrule to com_github_ivmai_cudd/bundled.BUILD.bazel Signed-off-by: Matt Liberty <[email protected]> * add build_test to cudd Signed-off-by: Matt Liberty <[email protected]> * rm build_test from cudd Signed-off-by: Matt Liberty <[email protected]> * correct package name in com_github_ivmai_cudd.bzl comments Signed-off-by: Matt Liberty <[email protected]> * make cudd libraries public visibility Signed-off-by: Matt Liberty <[email protected]> --------- Signed-off-by: Matt Liberty <[email protected]>
Conflicts: dependency_support/edu_berkeley_abc/bundled.BUILD.bazel
Using archive links from github is dangerous as they can change any time, as they build them on-the-fly, so hashing the file can create unstable hashes: https://github.blog/open-source/git/update-on-the-future-stability-of-source-code-archives-and-hashes/ (Unlike for instance nix, bazel does not hash the content of a tar but the binary tar.gz itself, so it is prone to run into the issue) Fix that by using another source that is providing the tar.gz itself, so is stable. Note: this will change this dependency from `@com_github_ivmai_cudd` to `@com_github_davidkebo_cudd`
Conflicts: .gitignore MODULE.bazel
Conflicts: .bazelversion extensions.bzl
|
Hi @MrAMS , echoing what was said above thank you so much for all of the effort here (and all others who have helped with this!) For this to be merged, would it be possible to point to the mainline repos for all of the git dependencies? Ideally everything would be BCR'd, but I would say that's not strictly necessary - but instead of forked repos from https://github.com/amorphic-io/ , if it's possible to point to the true upstream (and merge any fixes there first), that would improve the longevity of the project (so we can bump pointers as needed). |
|
I completely agree that publishing to the BCR is the best solution for longevity, and I am actively working on the submission process. However, since the BCR review can take some time, would it be possible to use my fork temporarily? To address concerns about the fork becoming stale, I have configured a CI pipeline that automatically pulls and merges the latest changes from the official upstream every month. This automation ensures the repo stays in sync with the mainline while I finalize the BCR packaging. Once the module is live on the BCR, I will immediately update this PR to point to the official bazel_dep. |
|
Or would it be acceptable if I updated this PR to point directly to the official upstream repository and applied my changes (such as the BUILD files) as a local patch file stored within this repo? This approach would ensure we are consuming the official source of truth (addressing the longevity/trust issue) without having to wait for the upstream or BCR to merge the Bazel support. Please let me know if this direction sounds good to you, and I will proceed with the changes. |
|
Note: |
|
Please do not spam YosysHQ projects with your build system PRs. They are not welcome and it is not appropriate to even send that many PRs without first asking the upstream project if they're interested in the maintenance burden of another build system. |
|
Hi @whitequark , I should have opened an issue to discuss this beforehand instead of sending multiple PRs directly. I respect your decision and will close these PRs immediately. Thank you for your work on YosysHQ. |
|
Thanks. |
|
@mikesinouye Given the reaction from the community, maintaining a separate fork seems to be the better choice. I plan to set up a CI pipeline to automatically merge changes from upstream on a monthly basis, as relying on patches would introduce too much maintenance overhead for me. |
|
@MrAMS have a look at this discussion: OpenROAD people seemed interested in the work I did. It would be amazing if you could continue there. If you feel like collaborating more, please let me know your preferred means of communication or just reach out. |
|
OpenROAD is slowly converting to having bazel be our main and eventually only build system. |
|
Hi @lromor @maliberty |
|
Here is a summary of my recent progress:
|
|
Hey, I noticed a number of PRs to BCR and am kinda confused. For these:
It looks like you're pointing to your private repo as the source of truth for builds? Also usurping ownership? The current state of those PRs makes me concerned so can you explain how they were generated and provide more context on the direction? |
|
Hi @UebelAndre , My forked repository will automatically pull and attempt to merge the latest upstream changes via CI every month. If upstream changes are detected and merged successfully, the CI will automatically submit a BCR update PR. You can check the CI status of these repositories. If you still think this approach is inappropriate, feel free to refuse to merge and close these PRs. |
|
Additionally, I have now decided not to continue trying to migrate rules_hdl to Bzlmod or publish it to BCR. After discussing with the open-source community, I found that rules_hdl is inconsistent with the minimal modularity concept of Bzlmod. I will focus on making further contributions to OpenROAD, bazel-orfs and rules_verilator in the future, so feel free to close this migration PR as well. Thank you again for your patience and guidance, as I’m still new to open-source contributions. |
Thanks! I'm not offended, just alarmed for security reasons by a bunch of changes that moved sources to private repos. I think contributing to OpenROAD would be great and to eventually see The-OpenROAD-Project/OpenROAD#8828 implemented. Thank you for all your work! |
Description:
This PR introduces Bzlmod support to the project. It builds mainly upon the groundwork laid by @lromor in this comment.
Changes:
mainbranch.Verification:
I have validated the changes using my minimal working project (specifically, see rules_hdl_overrides.MODULE.bazel).
The following rules have been tested and verified to work, covering Verilator simulation, Yosys synthesize and the OpenROAD full EDA flow:
verilog_libraryverilator_cc_librarysynthesize_rtlplace_and_routegds_writeGiven the long-standing discussions(issue#336, issue#332, issue#210, pull#405) regarding this migration since 2023, I believe now is the right time to move forward with Bzlmod.