【问题标题】:Why does GWT generate permutations having the same strong name?为什么 GWT 会生成具有相同强名称的排列?
【发布时间】:2014-01-28 09:54:08
【问题描述】:

我正在尝试调试我的 GWT 应用程序中的一个问题,即某些语言的 cache.html 文件未下载到浏览器。我编译了带有 DEBUG 标志的代码,并看到对于该特定模块,连续排列具有相同的名字。例如。

[INFO]    Permutation 0 (strong name 69FCD2BE193AD6EDC4FD6FDEF49874E4) has an initial download size of 98999 and total script size of 98999
[INFO]    Permutation 1 (strong name 69FCD2BE193AD6EDC4FD6FDEF49874E4) has an initial download size of 98999 and total script size of 98999
[INFO]    Permutation 2 (strong name 69FCD2BE193AD6EDC4FD6FDEF49874E4) has an initial download size of 98999 and total script size of 98999
[INFO]    Permutation 3 (strong name 658D84625663D1AD2C6C092B59783BA2) has an initial download size of 99004 and total script size of 99004
[INFO]    Permutation 4 (strong name 69FCD2BE193AD6EDC4FD6FDEF49874E4) has an initial download size of 98999 and total script size of 98999
[INFO]    Permutation 5 (strong name 69FCD2BE193AD6EDC4FD6FDEF49874E4) has an initial download size of 98999 and total script size of 98999
[INFO]    Permutation 6 (strong name 979A66F54677F53C0E4A1E29A2C00FE5) has an initial download size of 94649 and total script size of 94649
[INFO]    Permutation 7 (strong name 979A66F54677F53C0E4A1E29A2C00FE5) has an initial download size of 94649 and total script size of 94649
[INFO]    Permutation 8 (strong name 979A66F54677F53C0E4A1E29A2C00FE5) has an initial download size of 94649 and total script size of 94649

我已验证特定模块在其 gwt.xml 文件中具有与语言相关的所有条目。例如。

<extend-property name="locale" values="en_US" />
<extend-property name="locale" values="nl" />
<extend-property name="locale" values="da" />
<extend-property name="locale" values="de" />

这种行为的可能原因是什么?

【问题讨论】:

    标签: java javascript gwt localization


    【解决方案1】:

    强名称的'strong'部分表示名称与内容相关联,所以如果内容相同,则名称相同。字母和数字来自文件自身内容的散列 - 如果排列 0 和 1 具有相同的名称,则意味着它们也具有相同的内容。由于它们具有相同的内容,因此您只需拥有该文件的一份副本。

    您的各种语言环境是否有不同的字符串集,或者其中一些只是其他的副本(或空的)?除了语言环境,您还有其他属性配置吗?它们有什么作用?这些问题的答案将有助于解释为什么你有这么多排列,哪些没有意义,可以删除。

    【讨论】:

      猜你喜欢
      • 2015-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-26
      • 1970-01-01
      相关资源
      最近更新 更多