Skip to content

Commit

Permalink
chore: avoid wrong deprecation message (#2260)
Browse files Browse the repository at this point in the history
* validating the link consistently failing
  • Loading branch information
franciscolopezsancho authored Feb 3, 2025
1 parent b9af3f4 commit ddcce09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions codegen/core/src/main/scala/kalix/codegen/ModelBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import kalix.ValueEntityDef
import kalix.View
import kalix.WorkflowDef

import scala.annotation.nowarn
import scala.annotation.nowarn

/**
Expand Down Expand Up @@ -709,21 +710,23 @@ object ModelBuilder {
State(resolveMessageType(workflowDef.getState, protoPackageName, additionalDescriptors)))
}

@nowarn("msg=deprecated")
private def extractValueEntity(
serviceProtoDescriptor: ServiceDescriptor,
entityDef: ValueEntityDef,
additionalDescriptors: Seq[Descriptors.FileDescriptor])(implicit
log: Log,
messageExtractor: ProtoMessageTypeExtractor): ValueEntity = {

val typeId = getTypeId(entityDef.getTypeId, entityDef.getTypeId)
val typeId = getTypeId(entityDef.getEntityType, entityDef.getTypeId)
val protoPackageName = serviceProtoDescriptor.getFile.getPackage
ValueEntity(
defineStatefulComponentMessageType(entityDef.getName, messageExtractor(serviceProtoDescriptor)),
typeId,
State(resolveMessageType(entityDef.getState, protoPackageName, additionalDescriptors)))
}

@nowarn("msg=deprecated")
private def extractReplicatedEntity(
serviceProtoDescriptor: ServiceDescriptor,
entityDef: ReplicatedEntityDef,
Expand Down Expand Up @@ -779,7 +782,7 @@ object ModelBuilder {
throw new IllegalArgumentException("Replicated data type not set")
}

val typeId = getTypeId(entityDef.getTypeId, entityDef.getTypeId)
val typeId = getTypeId(entityDef.getEntityType, entityDef.getTypeId)
ReplicatedEntity(
defineStatefulComponentMessageType(entityDef.getName, messageExtractor(serviceProtoDescriptor)),
typeId,
Expand Down
3 changes: 2 additions & 1 deletion docs/config/validate-links.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{ "pattern": "^https://mvnrepository\\.com" },
{ "pattern": "^http://127.0.0.1:8080" },
{ "pattern": "^http://jaeger:4317"},
{ "pattern": "^http://localhost:16686"}
{ "pattern": "^http://localhost:16686"},
{ "pattern": "^https://supertokens.com/blog/are-you-using-jwts-for-user-sessions-in-the-correct-way"}
]
}

0 comments on commit ddcce09

Please sign in to comment.