-
Notifications
You must be signed in to change notification settings - Fork 113
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
Migrate rules_closure to Bzlmod #635
base: master
Are you sure you want to change the base?
Conversation
…e of assertHTMLEquals
Is this ready for review? |
yes, let us start the review. |
Why did you change the name of all BULD files? |
MODULE.bazel
Outdated
bazel_dep( | ||
name = "platforms", | ||
version = "0.0.5", | ||
dev_dependency = True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this only dev_dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add more dev_dependency to more deps, but I only do not want platform propagated to rules_closure's dependents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's go through each to decide which ones are for dev so we can help with the build performance (let's leave this to the end)
|
PTAL. |
maven.override( | ||
coordinates = "javacc:javacc", | ||
target = "@maven//:net_java_dev_javacc_javacc", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow this one; what is the purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
javacc is no longer updated and relocated → net.java.dev.javacc, so when javacc is needed, it should point to net_java_dev_javacc_javacc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a clatification comment and also double check jscompiler pom to see how it is working for them.
README.md
Outdated
], | ||
) | ||
```bzl | ||
bazel_dep(name = "io_bazel_rules_closure", version = "0.15.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have this instruction reflect current state that require manual fetching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you missed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the version. do you mean removing the version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think we need to have extra bazel_dep
for things that are not released.
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use https://github.com/google/bazel-common and remove manual auto-value / dagger stuff from there like @google_bazel_common//third_party/java/auto:value
README.md
Outdated
], | ||
) | ||
```bzl | ||
bazel_dep(name = "io_bazel_rules_closure", version = "0.15.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you missed this.
I do not see dagger in https://github.com/google/bazel-common ? |
I see. I will take a look for an alternative. |
PTAL (apart from dagger related) |
MODULE.bazel
Outdated
"com.google.jimfs:jimfs:1.1", | ||
"com.google.truth:truth:1.4.0", | ||
"javax.inject:javax.inject:1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google3/third_party/bazel_common/third_party/java/jsr330_inject ?
MODULE.bazel
Outdated
"org.jsoup:jsoup:1.16.1", | ||
"org.mockito:mockito-core:5.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google3/third_party/bazel_common/third_party/java/mockito
Though we might need to update bazel_common version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I've tried that in my previous version and it broke a test, that is why I revert back using this.
README.md
Outdated
], | ||
) | ||
```bzl | ||
bazel_dep(name = "io_bazel_rules_closure", version = "0.15.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think we need to have extra bazel_dep
for things that are not released.
PTAL |
|
||
java_test( | ||
name = "WebfilesTestSuite", | ||
size = "small", | ||
srcs = glob(["*.java"]), | ||
deps = [ | ||
":mockito", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to port @google_bazel_common//third_party/java/mockito directly as deps for WebfilesTestSuite, but it gives Unable to make private java.io.PrintStream(boolean,java.io.OutputStream) accessible: module java.base does not "opens java.io" to unnamed module @63b0c6dc
Add some comments, PTAL. |
I tried bumping rules_scala using the head from this branch https://github.com/mbland/rules_scala/commits/bzlmod-bazel-8/?before=031fb0d3a63467d87f25397eb8e23faa57d1d3a6+35 (his is the branch the current rules_webtesting is using)and got some errors related to scala deps https://paste.googleplex.com/6526197736144896. |
maven.override( | ||
coordinates = "javacc:javacc", | ||
target = "@maven//:net_java_dev_javacc_javacc", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a clatification comment and also double check jscompiler pom to see how it is working for them.
"@javax_inject", | ||
"@google_bazel_common//third_party/java/dagger", | ||
"@google_bazel_common//third_party/java/guava", | ||
"@google_bazel_common//third_party/java/jsr330_inject", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need explicit, maybe exported now?
"@javax_inject", | ||
"@google_bazel_common//third_party/java/guava", | ||
"@google_bazel_common//third_party/java/jsr305_annotations", | ||
"@google_bazel_common//third_party/java/jsr330_inject", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double check if all needed
"@google_bazel_common//third_party/java/dagger", | ||
"@google_bazel_common//third_party/java/guava", | ||
"@google_bazel_common//third_party/java/jsr305_annotations", | ||
"@google_bazel_common//third_party/java/jsr330_inject", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
No description provided.