-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove InetAddress.getLocalHost().hostName call [MERGE_WHEN_READY] #88
Conversation
…e seconds, and affected every configuration; probably only on mac: https://thoeni.io/post/macos-sierra-java/ my machine: impact plugin apply 5000ms+ -> 70ms
|
||
return hostName.startsWith("android-builder") | ||
private fun isRunViaMirakle(project: Project): Boolean { | ||
return project.hasProperty("mirakle.build.on.remote") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
где проставляем это свойство?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
проверил в интеграции руками, свойство видно изнутри билда
@@ -54,10 +54,8 @@ fun isRunFromGradleTestKit(project: Project): Boolean { | |||
fun isRunInGradleTestKit(): Boolean = | |||
System.getProperty("isTest", "false") == "true" | |||
|
|||
private fun isRunInMainframer(): Boolean { | |||
val hostName = InetAddress.getLocalHost().hostName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
дорогой вызов?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да, эта
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как ты наткнулся на это?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это выглядит как подвисающая кофигурация, когда внутри пытаемся резолвить localhost
мда... |
ну в целом оно и не нужно, это единственный вызов в узком месте у нас |
Описал причины, почему нужно самим отлавливать и не ходить по минному полю. |
* IDEA добавляет специальный init script, по нему понимаем что запустили в IDE | ||
* используется в :test-project | ||
*/ | ||
systemProperty("isInvokedFromIde", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как ты узнал про это?
А где почитать про концепцию инитскриптов?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
узнал просто залогировав параметры на старте, из консоли и из IDE различаются немного, это позволило сделать такую проверку
она не супер грамотная, т.к. только JB IDE детектит, но у меня не было цели все закрыть
could take 5+ seconds, and affects every configuration;
probably only on mac: https://thoeni.io/post/macos-sierra-java/
my machine: impact plugin apply 5000ms+ -> 70ms