You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2023/07/10 12:03:23 UTC

[GitHub] [linkis] peacewong commented on a diff in pull request #4760: [bugfix] Append code `val a=1` to prevent bugs that do not exit tasks for a long time

peacewong commented on code in PR #4760:
URL: https://github.com/apache/linkis/pull/4760#discussion_r1258143450


##########
linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/interceptor/impl/CommentInterceptor.scala:
##########
@@ -102,7 +103,15 @@ object ScalaCommentHelper extends CommentHelper {
   override val commentPattern: Regex = """^\s*//.+\s*""".r.unanchored
   private val scalaCommentPattern: String = "(?ms)([\"'](?:|[^'])*['\"])|//.*?$|/\\*.*?\\*/"
 
-  override def dealComment(code: String): String = code
+  override def dealComment(code: String): String = {
+    // Append code `val a=1` to prevent bugs that do not exit tasks for a long time
+    if (EntranceConfiguration.ENTRANCE_SCALA_APPEND_CODE_ENABLED.getValue) {

Review Comment:
   Is it more reasonable to modify Scala Code Parser, go to append val linkisVar=1



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org