-
Notifications
You must be signed in to change notification settings - Fork 554
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
How can separate packages load core without conflict? #827
Comments
When we've discussed this before, we agreed that core will never conflict. So any change in behavior will have to be made in a backwards compatible way. Right now, the only things in core are the initial constructor, ( |
Great, just wanted to make sure about our explicit commitment here. /cc @jgeewax |
I agree that we need to follow this rule for the global constructor, but I thought we also settled that we'd put other stuff (ie, common iteration logic) in there that was common rather than repeating ourselves... If we don't, we're setting ourselves up for mistakes where So given we'll have common logic in this core package, we need a way to make sure that the single package knows multiple versions worth of that logic, and saying "we just will always be backwards compatible" seems like an iffy way of doing this. The only suggestion I've heard so far that seems legit has been to use "path versioning" where I have I'm open to other options, but as mentioned several times, breaking DRY and putting multiple copies of common logic in different packages seems like we're digging ourselves another hole. And just saying "we won't let it get out of hand" seems prone to accidental failure. |
Yes, this is what we discussed before. One example would be the incremental backoff, which is already replaced by Google API Client for JSON APIs, and will soon be replaced by GAX for GRPC APIs. We would have a common implementation of backoff as The other non-public shared logic in core is check for the Google Compute Engine |
I think we are all in agreement as to how to manage breaking changes, as there are not a lot of options. What @jgeewax calls "path versioning", I call "a new namespace" and @blowmage calls "a new class". @jgeewax I agree with your recommendation to aggressively refactor duplicated code to the core library. |
Gonna close this. Please reopen if there are more questions. |
As we modularize into separate packages (see #813), we must ensure that separately-loaded gems' dependencies on
google-cloud-core
never conflict.I am guessing that we must simply guarantee that
google-cloud-core
is always backwards-compatible. Failing that, we must move behavior that is not backwards-compatible to a new namespace. Any other ideas?The text was updated successfully, but these errors were encountered: