-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Merge GoLibrary and GoSource providers #4030
base: master
Are you sure you want to change the base?
Conversation
go/private/actions/stdlib.bzl
Outdated
""" | ||
library = go.new_library(go) | ||
source = go.library_to_source(go, {}, library, False) | ||
source = new_source(go, {}, coverage_instrumented = False) |
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 this helper from the context since it seemed simpler to just import the code we want to call, but I can put it back if desired
de1d5bb
to
dae743d
Compare
Can we shim the library, perhaps by having |
Aliasing them is a good idea, I think I'll keep the existing APIs for now but implement |
e904d8e
to
596038b
Compare
From an end user perspective, I would think that a |
Can we just call it |
Yeah 👍 to keep aliases around for backward compatibility |
b6e2b49
to
792404a
Compare
|
792404a
to
b5cb91c
Compare
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.
@tyler-french Could you also test this at Uber?
8243f56
to
4fe1b52
Compare
4fe1b52
to
886f0c2
Compare
Hey @dzbarsky, I'm having trouble with testing this PR with our thriftrw plugin. Here's the code for that:
Here's the error I'm getting:
Do you know why this might be? Also, I tried using Let me know if you have any ideas what might be happening. Thanks! |
@tyler-french Thanks for giving it a shot! I suspect that what might be happening is I recommend to switch to calling
|
886f0c2
to
f08cd28
Compare
@dzbarsky @fmeum @linzhp I think I would like to wait to merge this PR until after we release The only other breaking changes after That was we reduce the amount of breaking changes in this release, and also will soon give users the chance to migrate their providers. I want to make sure we do our best to make sure consumers of rules_go have a good experience. |
@tyler-french That plan sounds good to me. BTW I'm not sure if your breakage with the thrift rules is caused by this PR, it might be another one of the PRs. Here's some potential breaking changenots I drafted (though most of these are very minor and unlikely to be an actual issue) |
@dzbarsky You're right, it seems to be a different PR. Here's the full code of the plugin:
I am slightly concerned about all of these breaking changes here. |
@tyler-french Can you try replacing your
Your concern is fair but i think the list is a bit pedantic and a lot of the changes are to providers that are already declared to be non-public API in the docs. In practice the actual changes that I think may cause some snags:
I think we can smooth out (2) by fixing up |
I also like the release plan. We should probably fix #4062 for that release, I'll look into it tomorrow. The breaking changes David listed are also the three I consider most relevant. As we will document them in the release notes, I think that migration won't be too problematic given how much users can gain. @dzbarsky Do you have before/after CPU/memory data for your series if patches? |
**What type of PR is this?** Starlark fixup **What does this PR do? Why is it needed?** Make the migration process a little smoother **Which issues(s) does this PR fix?** #4030 (comment) **Other notes for review**
Sorry, hitting another failure here:
This is the resolve function here:
|
@tyler-french No problem, thanks for iterating with me on this :) If I'm reading correctly,
does that work? |
f08cd28
to
aea63e3
Compare
d10b887
to
492f6cb
Compare
492f6cb
to
bed6832
Compare
bed6832
to
6cc49b2
Compare
@fmeum shall we merge this? Are we waiting for anything else? |
What type of PR is this?
Code simplification
What does this PR do? Why is it needed?
These providers are 1:1, and we always create a library followed by
source_from_library
. Merging them allows to remove thelibrary
field fromGoSource
as well as the theresolve
field, since we don't need to smuggle the closure between the providers anymore.If we do this, we will also need to fix up Gazelle. We can either have a patch in this repo so CI passes and then followup with the Gazelle fix, or somehow shim the API until we release new versions in lockstep. Open to ideas how to best do this.
Which issues(s) does this PR fix?
One step toward #2578
Fixes #
Other notes for review