robolectric / robolectric-bazel

Bazel support for Robolectric (https://github.com/robolectric/robolectric)
15 stars 15 forks source link

Will robolectric-bazel follow KSP's release rule for extra bazel related patch version? #95

Open utzcoz opened 8 months ago

utzcoz commented 8 months ago

See https://github.com/robolectric/robolectric-bazel/pull/92, https://github.com/robolectric/robolectric-bazel/pull/92#issuecomment-1943001681.

This idea was brought by @Bencodes , and it looks great to me, and sometimes we need to release new versions for bazel related patches only.

utzcoz commented 8 months ago

What do you think about it @brettchabot @hoisie ?

Bencodes commented 8 months ago

Shall we press forward with this? Easy enough to roll back to the old versioning if we decide in the future that it's not worth it or adds too much overhead.

utzcoz commented 8 months ago

@Bencodes I think this new version schema proposal is great. But I think it might require extra approvals from Robolectric's leader @hoisie @brettchabot . If they don't response, I will ping them with email again this weekend.

hoisie commented 8 months ago

This all SGTM, thanks @Bencodes for taking the lead on this. I am happy to proceed.

utzcoz commented 8 months ago

@hoisie Thanks for showing your suggestion. @Bencodes Maybe we can start to land a new version with this new schema.

Bencodes commented 7 months ago

Just pushed a release with the new versioning. Thanks @hoisie and @utzcoz!

Bencodes commented 7 months ago

Found an issue with this approach. The BCR treats the -1.0.0 as a pre-release rather than a new release.

https://github.com/bazelbuild/bazel-central-registry/pull/1595#discussion_r1518361588

Bencodes commented 7 months ago

Looking at the tests this versioning strategy will work as expected if we clean-cut to a new major release. But this doesn't solve the immediate problem of us needing to do a version bump on the Bazel rules.

https://github.com/bazelbuild/bazel-central-registry/blob/ddc9cd60dcd11a65e200dd2275c4babd837fe928/tools/version_test.py#L8

utzcoz commented 7 months ago

@Bencodes Maye we can use the version like 4.11.1.1?

utzcoz commented 7 months ago

There is a test for 4.11.1.1 > 4.11.1, see https://github.com/bazelbuild/bazel-central-registry/blob/ddc9cd60dcd11a65e200dd2275c4babd837fe928/tools/version_test.py#L14.

Bencodes commented 7 months ago

4.11.1.1 would work, it just has more opportunity to conflict with the upstream Robolectric releases, which wouldn't be ideal and potentially cause confusion.

utzcoz commented 7 months ago

@Bencodes I think Robolectric will bump to Robolectric 4.11.2 instead of 4.11.1.1 for a minor patch version. Maybe it is safe to use this patch format in Bazel library?

Bencodes commented 7 months ago

@utzcoz that works for me!

utzcoz commented 7 months ago

@hoisie Can we confirm that the Robolectric maven only uses three version numbers, and the last one is left to Robolectric Bazel? It's better we can give a confirmation for this decision.

utzcoz commented 7 months ago

@Bencodes I give my +1 for new versioning. So we can use new versioning for later patch version.