-
Notifications
You must be signed in to change notification settings - Fork 385
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
CLDR-13970 Update ExampleDependencies and related code #3371
Conversation
-Bug fix: when generating example dependencies, disable caching in ICUServiceBuilder to prevent some dependencies from being missed -New cldr.util.GenerateExampleDependencies replaces old cldr.test.TestExampleDependencies -Include DO NOT EDIT comments in ExampleDependencies.java, clarify it is generated -Bug fix: prevent NullPointerException in ExampleGenerator.getOtherGender/getOtherCase -Bug fix: OpenAPI validation CWWKO1650E missing descriptino for 404 in UserAPI.java (unrelated) -Remove dead code, fix warnings -Comments
This fixes problems with generating the dependencies, where the example for one path depends on the values for other paths. Some dependencies were formerly missed due to caching. The resulting file ExampleDependencies.java is now complete (as far as I can tell), and it can be kept up to date by running GenerateExampleDependencies when necessary (probably just before each time Survey Tool is opened for submission), as follows:
Unfortunately, there are still failures to update examples in the running Survey Tool. I suspect this is still due to caching, so that even though examples are regenerated, they're regenerated using outdated cached values -- not cached examples, but cached values (for names of months, etc.) in ICUServiceBuilder and/or elsewhere. I've added a new boolean constant ISB_CAN_CLEAR_CACHE for testing this hypothesis. So far, it looks like even when testing with ISB_CAN_CLEAR_CACHE true (which probably goes too far and has a bad effect on performance), the examples are still not regenerated correctly. |
|
||
public void setCacheOnly(boolean cacheOnly) { | ||
exCache.setCacheOnly(cacheOnly); | ||
icuServiceBuilder.setCachingEnabled(enabled); |
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.
This is the most essential change, used with enabled = false only by GenerateExampleDependencies, not while ST is running
GenerateExampleDependencies now takes about an hour, where it used to take about 20 minutes. The resulting file is about twice as large, and it would be about 4 times as large were it not for using putAll instead of put. |
We should add a BRS task for GenerateExampleDependencies, at least once before each time ST is opened for submission. |
-Bug fix: when generating example dependencies, disable caching in ICUServiceBuilder to prevent some dependencies from being missed
-New cldr.util.GenerateExampleDependencies replaces old cldr.test.TestExampleDependencies
-Include DO NOT EDIT comments in ExampleDependencies.java, clarify it is generated
-Bug fix: prevent NullPointerException in ExampleGenerator.getOtherGender/getOtherCase
-Bug fix: OpenAPI validation CWWKO1650E missing description for 404 in UserAPI.java (unrelated)
-Remove dead code, fix warnings
-Comments
CLDR-13970
ALLOW_MANY_COMMITS=true