-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix clearing cache of failed locale lookup after successfully resolving locale #783
Conversation
PR HealthBreaking changes ✔️Details
Changelog Entry ✔️Details
Changes to files need to be accounted for in their respective changelogs. Coverage
|
File | Coverage |
---|---|
pkgs/intl/lib/message_lookup_by_library.dart | 💔 Not covered |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check
License Headers ✔️
Details
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files |
---|
no missing headers |
All source files should start with a license header.
Unrelated files missing license headers
Files |
---|
pkgs/intl_translation/example/lib/generated/messages_all.dart |
pkgs/intl_translation/example/lib/generated/messages_all_locales.dart |
pkgs/intl_translation/example/lib/generated/messages_de.dart |
pkgs/intl_translation/example/lib/generated/messages_de_CH.dart |
pkgs/intl_translation/example/lib/generated/messages_en.dart |
pkgs/intl_translation/example/lib/generated/messages_es.dart |
pkgs/intl_translation/example/lib/generated/messages_iw.dart |
pkgs/intl_translation/test/generate_localized/code_map_messages_all.dart |
pkgs/intl_translation/test/generate_localized/code_map_messages_all_locales.dart |
pkgs/intl_translation/test/generate_localized/code_map_messages_fr.dart |
pkgs/intl_translation/test/two_components/app_messages_all.dart |
pkgs/intl_translation/test/two_components/app_messages_all_locales.dart |
pkgs/intl_translation/test/two_components/app_messages_fr.dart |
pkgs/intl_translation/test/two_components/component_messages_all.dart |
pkgs/intl_translation/test/two_components/component_messages_all_locales.dart |
pkgs/intl_translation/test/two_components/component_messages_fr_xyz123.dart |
pkgs/messages/example_json/lib/testarb.g.dart |
pkgs/messages/example_json/lib/testarbctx2.g.dart |
pkgs/messages_shrinker/bin/messages_shrinker.dart |
Package publish validation ✔️
Details
Package | Version | Status |
---|---|---|
package:intl | 0.20.0-wip | WIP (no publish necessary) |
package:intl4x | 0.7.1 | already published at pub.dev |
package:intl_translation | 0.20.0-wip | WIP (no publish necessary) |
package:messages | 0.2.0 | already published at pub.dev |
package:messages_builder | 0.2.1 | already published at pub.dev |
package:messages_serializer | 0.2.1 | already published at pub.dev |
package:messages_shrinker | 0.2.1 | already published at pub.dev |
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
…ale in composite message lookup
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.
Thanks for contributing!
Hi @mosuem, just wondering where things are at with getting a release out with this included? |
I believe this is released with |
Thanks for replying @mosuem |
Ah sorry, I was looking at |
Inside of the composite message lookup there is a clause which will never be executed that clears the cache after successfully resolving the locale.
The clause is meant to handle the case where a message is looked up before the messages have been successfully loaded as it leave the cache in a state where
_lastLocale
has been set and_lastLookup
is null.Since this clause is broken then any subsequent attempt to access a message from that locale will fail as the
_lookupMessageCatalog
is never called again to load the messages.