-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add policy for experimental Go API #9209
Comments
my 2c:
|
Some experimental APIs might be depending on the existing stable API. If we want to move them to experimental modules, we'd have to deal with some tricky inter-dependancy issues and unnecessary complicate the modules layout. For such use cases, build tags seems like a pretty good solution. I hope there should be a way to tweek IDEs to work better with them, I haven't tried it myself though. For experimental APIs that can be easily introduced as separate modules, why do we need to move them under The problem with the |
@yurishkuro @dmitryax I am not proposing a new
Our beta modules have some stability guarantees, both in terms of what we document but also on what we are in practice doing (we are conservative with making breaking changes even if we can). An experimental module would be one where 'anything goes': things may break from one version to the other and we may give up on the module entirely.
I agree that build tags have usability issues, I think the alternative (the 'just a comment' approach) causes much more pain as exemplified by grpc-go. Still, they are usable if your IDE is configured correctly.
Given that I am not proposing using a different folder I think this is no longer a concern, right? |
Sorry for the misunderstanding. Having another
Right. |
I am going to remove this from Collector v1, I think we will need to solve this eventually, but we don't have to fix this for Collector 1.0 |
When working on #8935, one of the discussion points was about experimental symbols #8935 (comment), which we decided to postpone. My proposal is to rely on separate Go modules as much as we can, and fall back to Go build tags whenever that is not feasible.
Prior work
For previous issues that touch on this topic see #4705 and #4832
// Unstable
,// Experimental
or a similar prefix, and what alternatives are available. After skimming, I think proposal: cmd/doc: add "// Unstable:" prefix convention golang/go#34409 (comment) and proposal: cmd/doc: add "// Unstable:" prefix convention golang/go#34409 (comment) are particularly interesting comments.Proposed solution
experimental
following the versioning schemav0.0.x
. Parts of the codebase we deem very unstable will be on separate modules under this module set. Symbols in these modules may not follow our usual deprecation guidelines (e.g. API may be removed without notice and we may remove the module after deprecating).otel_collector_
)panic
with a meaningful message if the build tag is not present).For (2), we may need to explore how this interacts with the builder (e.g. specify build tags used by components on
metadata.yaml
and have the builder pick these up in some way).Rationale
Footnotes
Edit: That is, a new entry under the
module-sets
key onversions.yaml
↩The text was updated successfully, but these errors were encountered: