NativeScript / NativeScript/android
If you create a custom activity more than once an exception should be thrown
オープン
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 563
- フォーク
- 144
- 平均マージ
- 10時間 46分
- マージ済み PR(30日)
- 14
説明
- Create new project
- Try to extend the
com.tns.NativeScriptActivity, which is create by tns-core-modules
Code:
var MyCustomActivityClass = (function (_super) {
__extends(MyCustomActivityClass, _super);
function MyCustomActivityClass() {
_super.call(this);
return global.__native(this);
}
MyCustomActivityClass.prototype.onCreate = function (savedInstanceState) {
_super.prototype.onCreate.call(this, false ? savedInstanceState : null);
android.util.Log.d("Sbg.Test","we got called from onCreate of custom-activity.js");
};
MyCustomActivityClass = __decorate([
JavaProxy("com.tns.NativeScriptActivity")
], MyCustomActivityClass);
return MyCustomActivityClass;
}(android.app.Activity));
- Build the app for android
tns build android
Actual: A warning will be logged "Warning: there already is an extend called com.tns.NativeScriptActivity."
Expected: An exception to be thrown https://github.com/NativeScript/android-runtime/blob/2ab7271d12d56a03e57880a2b1783b08206363ae/test-app/build-tools/static-binding-generator/src/main/java/org/nativescript/staticbindinggenerator/Generator.java#L82
P.S. In some cases the exception is thrown, but this situations are very rare.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンク先の Generator.java の82行目付近から始め、com.tns.NativeScriptActivity に対する重複した extends がどのように処理されるかを追跡してください。報告されたカスタム Activity の再現を tns build android で実行してください。重複した拡張によって警告が記録されるだけでなく、期待される例外が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, java, javascript
- 領域
- build-system, mobile-dev
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 52/100