Upcoming breaking change to Flogger backend API and Tags class.

48 views
Skip to first unread message

David Beaumont

unread,
Aug 5, 2020, 3:37:49 PM8/5/20
to Flogger Discuss
I'm sorry to have to announce this, but an upcoming release of Flogger will include a breaking change to a backend API, by moving the Tags class from one package to another.

This is being done to prepare for the release of the "proper" scoped logging context API and gRPC support for tags and forced logging.

It's unlikely that most users will be affected by this, but if your code imports:
* com.google.common.flogger.backend.Tags
then after the next release it should import:
* com.google.common.flogger.context.Tags
instead.

You can't do this before the release, since the APIs which accept instances of this class won't have changed yet, and it is sadly rather infeasible to do this as a staged migration (I've been delaying doing it while trying to figure out how to do a nice staged migration, but at this point I think it'll just be much quicker to make a "clean break" and people can just search & replace the import statement.

The new classes are in the api/ directory (and have been for ages) but they can't be used until the old ones are migrated away from (and that's far messier than I had expected).

As far as I'm aware, the Tags class is used by almost nobody (other than Gerrit), but if you are relying on it then please let me know so we can coordinate the timing of the change.

Since Flogger is still on a 0.x release with no promises of stability (especially in backend APIs) this won't be a semantic version bump (the semantic version is conceptually "unstable" anyway).

Cheers, and apologies for any inconvenience,

    David

--
David Beaumont :: Îñţérñåţîöñåļîžåţîờñ Libraries :: Google
Google Switzerland GmbH., Brandschenkestrasse 110, CH-8002, Zürich - Switzerland

David Beaumont

unread,
Aug 12, 2020, 10:25:18 AM8/12/20
to Flogger Discuss
Just as a heads up, the breaking changes are going in to the github branch today, and the next release will have the break in it (users should just need to update one import statement):

* com.google.common.flogger.backend.Tags
becomes
* com.google.common.flogger.context.Tags

There's some more shuffling of code in this area of Flogger (scoped contexts) but it's all moving towards being able to release a super-useful new feature, so hopefully that will make any inconvenience worthwhile.

Thanks for your patience,
    David

Reply all
Reply to author
Forward
0 new messages