gpt4 book ai didi

gwt - 如何找到 GWT 排列的根本原因

转载 作者:行者123 更新时间:2023-12-04 14:00:59 24 4
gpt4 key购买 nike

我有相当大的 GWT 项目,它依赖于许多第三方库。在编译应用程序的 GWT 部分时,我看到 GWT 编译器经历了 10 次排列。但我只为 5 种不同的浏览器和一种语言环境进行编译。我怎样才能弄清楚是什么导致了每个排列?是否有一些设置我可以启用,打印出每个排列在编译时的用途。一些会给我输出的东西:

Compiling Permutation 0 - Browser ie8 and Locale En  ....
Compiling Permutation 1 - Browser ie9 and Locale En ....

我的 gwt.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='LibraryPlace'>

<inherits name="com.github.gwtbootstrap.BootstrapNoResources"/>
<inherits name='com.biglibrary.libraryplace.model.LibraryModel'/>
<inherits name="com.biglibrary.common.LiCommon"/>
<inherits name="org.atmosphere.gwt20.AtmosphereGwt20"/>
<inherits name='com.google.web.bindery.event.EventBinder'/>
<inherits name="com.google.gwt.logging.Logging"/>

<stylesheet src="/css/datepicker.css"/>

<!-- LATO font -->
<!--<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic">-->
<!-- Bootstrap CSS -->
<stylesheet src="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic"/>
<!--<stylesheet src="/css/bootstrap.css"/>
<stylesheet src="/css/bootstrap-responsive.css"/>-->

<stylesheet src="/css/toastr.css"/>
<stylesheet src="/css/fullcalendar.css"/>
<!-- Library Place New Custom CSS based on MyAdmin Theme Custom CSS -->
<stylesheet src="/css/style.css"/>

<stylesheet src="/css/clock/clock-style.css"/>


<source path='resources'/>
<replace-with class="com.biglibrary.libraryplace.resources.LibraryConfigurator">
<when-type-is class="com.github.gwtbootstrap.client.ui.config.Configurator"/>
</replace-with>
<public path="resources">
<exclude name="** /*.java"/>
<exclude name="** /*.class"/>
</public>


<!-- Other module inherits-->
<inherits name="de.devbliss.gwt.xdm.XDM"/>
<inherits name="com.watopi.chosen.Chosen"/>

<!-- enable @CORS annotations in restygwt -->
<extend-configuration-property
name="org.fusesource.restygwt.annotationresolver"
value="org.fusesource.restygwt.rebind.CORSAnnotationResolver"/>

<replace-with class="de.devbliss.gwt.xdm.client.impl.CORSTransportLayer">
<when-type-is class="com.biglibrary.libraryplace.client.xdr.XDRTransportLayer"/>
<any>
<when-property-is name="user.agent"
value="gecko1_8"/>
<when-property-is name="user.agent"
value="safari"/>
</any>
</replace-with>

<inherits name="com.google.gwt.logging.Logging"/>

<!-- gwt logging properties -->
<set-property name="gwt.logging.logLevel"
value="FINE"/>

<set-property name="gwt.logging.popupHandler"
value="ENABLED">
<any>
<when-property-is name="user.agent"
value="ie8"/>
<when-property-is name="user.agent"
value="ie9"/>
</any>
</set-property>

<!--Gives java like stack trace for errors that come up in js-->
<set-property name="compiler.emulatedStack"
value="true"/>
<set-configuration-property
name="compiler.emulatedStack.recordFileNames"
value="true"/>


<!-- Specify the app entry point class. -->
<entry-point class='com.biglibrary.libraryplace.client.LibraryPlace'/>

<!--Chrome or Safari-->

<set-property name="user.agent" value="opera,ie8, gecko1_8, safari, ie9"/>

<!-- Specify the paths for translatable code -->
<source path='client'/>

<define-configuration-property name="gin.ginjector"
is-multi-valued="false"/>
<set-configuration-property name="gin.ginjector"
value="com.biglibrary.libraryplace.client.gin.AppGinjector"/>
<!--
Ensure Ui Binder files are using Safe HTML to prevent XSS.
-->
<set-configuration-property name="UiBinder.useSafeHtmlTemplates"
value="true"/>
<!-- English language, independent of country. -->
<extend-property name="locale"
values="en"/>

<!-- Default language (English) -->
<set-property-fallback name="locale"
value="en"/>

<add-linker name="xsiframe"/>
<set-configuration-property name="gwt.superdevmode"
value="on"/>
<set-configuration-property name="devModeRedirectEnabled"
value="true"/>
<set-property name="compiler.useSourceMaps"
value="true"/>
</module>

最佳答案

当您使用 xsiframe 编译项目时链接器你将有一个 compilation-mappings.txt文件在您的 javascript 文件夹中。

它包含一个非常有用的列表,其中包含所有排列和触发每个排列的属性。

 F7437BC8947642CC76A8E491E7E52DB4.cache.js
mgwt.os desktop
user.agent safari

F7437BC8947642CC76A8E491E7E52DB4.cache.js
mgwt.os desktop
user.agent gecko1_8
[...]

一旦您知道哪些属性会产生每个排列,您就可以深入了解 *.gwt.xml文件以了解哪些属性正在增加排列数。

就您而言,如果您只使用 en语言,最好不要设置它,因为gwt只会编译 default , 否则就是编译 defaulten语言。

另一个减少排列的有用选项是使用 collapse-property特征。
 <collapse-property name="language" values="*" />

关于gwt - 如何找到 GWT 排列的根本原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21267009/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com