这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@COx2
Copy link
Collaborator

@COx2 COx2 commented Jun 9, 2019

No description provided.

@hotwatermorning hotwatermorning merged commit e01ea42 into master Jun 10, 2019
@hotwatermorning
Copy link
Owner

hotwatermorning commented Jun 10, 2019

@Field annotationが効かなくなったのは、ここで報告されているのと同じ現象かもしれません。
https://discuss.gradle.org/t/gradle-5-0-field-variable-visibility-issue/30060

僕もいろいろ探してみましたが、Gradle 5からこれが効かなくなったっぽいことについて、全然情報が見つからないですね。

そもそもVst3SampleHostのbuild.gradleでこれを使用していたのは、スクリプト中にClosureではなくただの関数を定義して使用するときに、その関数の中からスクリプトスコープの変数が見えないというGroovy側の設計に関わる仕様があって、それを回避する目的で@Fieldを付けていました。
http://uehaj.hatenablog.com/entry/20110703/1309685397

ただ、(関数からアクセスできるようにするために)スクリプトスコープの変数全部にこれを定義するのも面倒ですし、どうもGroovyを使う上では常に関数ではなくClosureを定義するほうが�面倒がなさそうなので、その方針にして @Field の使用自体も止めてしまって問題なさそうですね。

PRありがとうございます。Terraの方も同じように修正します。

@hotwatermorning hotwatermorning deleted the jdk12 branch August 25, 2019 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants