[翻譯] GWT 2.9.0 發布

作者: PsMonkey (痞子軍團團長)   2020-06-03 00:42:58
沒啥差別的 blog 版本: http://blog.dontcareabout.us/2020/06/gwt-290.html
亮點
====
* 可以用 jsinterop-base 1.0.0、
elemental2 1.0.0、
jsinterop-annotations 2.0.0(除了 `@JsAsync` 跟 `@JsEnum`)
做 compile,這會讓 GWT2 將可以用 J2CL 以及這些工具來 compile。
* 增加 Java language level 9, 10, 11 的支援度。
* 正式停止在 Java 7 上執行 GWT compiler 與 server side tooling 的支援。
在這個版本當中,GWT 還是可以在 Java 7 上 compile,
但是不會保證能否運作。
未來的版本會以 Java 8+ compile bytecode。
這個版本用來測試與提供不同平台上搭配 Java 8, 11, 14 一起運作的方式。
棄用
====
* Elemental 已經正式棄用了,
這個版本裡頭還有,但是未來的版本當中可能就不會出現
。我們建議用 Elemental2 來取代,
它可以同時用 GWT2 以及 J2CL compile。
* 移除 `NoSuchMethodException` 的模擬。
修正
====
* 修正 `float[]` 與 `double[]` 的 `Arrays.binarySearch()`。
* error / exception 增加支援多行訊息。
* `DiskCache` 增加關閉的 hook 來清除暫存檔們。
* 將 Gecko 版號快取起來,以減少在 FireFox 的 CPU 使用率
* 不再假設「`this` 一定不是 null」
* Updates globals for Firefox version 60.0.2, Chrome 66.0.3359.45。
* 修正 `String.regionMatches()`。
* 原生的 `JsMethods` 允許跟實做程式碼以相同名稱共存。
* 必要時,確保 lambda 的 box、unbox、insert 有消除 cast。
* `Double.compare()` 與 `Float.compare()` 正確地處理負 0。
雜項
====
* CLDR 更新到 v.34。
* `Arrays` 現在有 implement `Cloneable`。
* Link backing errors together with a cause attribute,
start tracking suppressed errors in addition to
the cause in underlying error object.
* `AtomicReference` 加到 `gwt/emul`。
* Propagate script nonces via `ScriptInjector`
* 增加 `ExecutorService` 與 `ScheduledExecutorService` 的部份功能模擬。
* 模擬 `java.util.concurrent.Flow`。
* 模擬 `javax.annotation{,.processing}.Generated`。
* 當 `goog.global` 沒有定義時,讓他變成 `$wnd。`
* 增加 `when-linker-added` element definition。
* 增加 `Reader` 以及 `StringReader` 模擬。
* 移除 GWT 版本檢查。
* synthetic method 不會顯示「unusable-by-js」警示。
* Update unmodifiableList to throw on Java8 methods.
* 預設關掉 `DataflowOptimizer`,用到時會發出警告。

Links booklink

Contact Us: admin [ a t ] ucptt.com