Skip to content
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

WIP: Improve all public APIs by dropping (using Context) #538

Merged
merged 40 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1ee09ec
wip, a lot more to do, compiles
lbialy Sep 3, 2024
70d2538
it works! or at least looks like it works!
lbialy Sep 6, 2024
e5175f0
drop the overloaded apply in internals, fix integration tests failing…
lbialy Sep 8, 2024
b165c16
fix besom-cfg-k8s
lbialy Sep 8, 2024
c3ae303
fix besom-cfg-k8s tests
lbialy Sep 14, 2024
3a4a130
progress
lbialy Sep 17, 2024
7906c21
tests for context propagation (parenthood propagation) working correctly
lbialy Sep 17, 2024
290eeed
more public apis cleaned, codegen yet to be done
lbialy Sep 17, 2024
a4e7a42
codegen done, tests of packages now
lbialy Sep 18, 2024
baccd28
fixed overlays
lbialy Sep 19, 2024
e0eacb2
fixed besom-cfg usage of Context
lbialy Sep 20, 2024
31b2b1f
more clean-up
lbialy Sep 24, 2024
586c1f4
split rpc from core
lbialy Sep 25, 2024
18f0dac
add dependency on rpc in core and fix formatting everywhere
lbialy Sep 25, 2024
e5fedfa
fix justfile
lbialy Sep 25, 2024
d4cac68
bump pulumi version in CI so that fix to IT works on CI too
lbialy Sep 25, 2024
3b9c020
what the hell, gha?
lbialy Sep 25, 2024
64064a4
gha vscode plugin is stupid and describing stuff in yaml is stupid
lbialy Sep 25, 2024
ab8ffa3
Try to speed up builds by @prolativ
prolativ Sep 25, 2024
f48fe45
Verbose logging of pulumi cli in integration tests to diagnose CI
lbialy Sep 26, 2024
88af014
fix justfile - besom-rpc module did not have no-bloop var renamed
lbialy Sep 26, 2024
ebb4427
uh, list expand into vararg doesn't work when it's not the last arg, …
lbialy Sep 26, 2024
3a22a8f
fix TF_LOG
lbialy Sep 26, 2024
b2a77c1
uncomment previously non-compiling methods
lbialy Sep 27, 2024
b1cea8b
uncomment previously non-compiling tests!
lbialy Sep 27, 2024
3516514
debugging deadlock on CI
lbialy Sep 28, 2024
4cc81ae
fix fmt
lbialy Sep 30, 2024
c65b449
fix gradle build in IT
lbialy Sep 30, 2024
3d1707b
fix gradle build in IT
lbialy Sep 30, 2024
44f96cf
fix gradle & maven build in IT
lbialy Sep 30, 2024
3020a22
fix gradle & maven build in IT again
lbialy Sep 30, 2024
0f2e80f
drop all sonatype:snapshots and remove all autogenerated project.scal…
lbialy Sep 30, 2024
400b29a
always compile examples without bloop server
lbialy Oct 1, 2024
1fdee2b
always compile templates without a bloop server
lbialy Oct 1, 2024
c78eece
fix compiler plugin test
lbialy Oct 1, 2024
5ebf7e2
drop debugging code in Promise
lbialy Oct 1, 2024
a80075b
add missing code comments
lbialy Oct 2, 2024
5856f63
restore sonatype:snapshots in examples
lbialy Oct 2, 2024
d67b68c
drop comments
lbialy Oct 2, 2024
278c2fb
add repository sonatype:snapshots in templates too
lbialy Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ jobs:
- uses: extractions/setup-just@v1
with:
just-version: '1.14.0' # just for sanity
- uses: pulumi/actions@v4
- uses: pulumi/actions@v5
with:
pulumi-version: '3.116.1'
pulumi-version: '3.134.0'
- uses: coursier/cache-action@v6.4.3
- uses: VirtusLab/scala-cli-setup@v1.1.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version = 3.5.2
runner.dialect = scala3
project.excludePaths = [
"glob:**/src/main/scala/besom/rpc/**.scala"
"glob:**/besom-rpc/src/main/scala/**.scala"
]
project.git = true
align = most
Expand All @@ -11,4 +11,4 @@ align.tokens = [{code = "=>", owner = "Case"}, "<-", "%", "%%", "="]
indent.defnSite = 2
maxColumn = 140

rewrite.scala3.insertEndMarkerMinLines = 40
rewrite.scala3.insertEndMarkerMinLines = 40
117 changes: 66 additions & 51 deletions Justfile

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,15 @@ import besom.api.aws
> Besom **does NOT depend on Pulumi Java SDK**, it is a completely separate implementation.

## Tips
- Whenever you use Besom outside the `Pulumi.run` block, pass [`Context`](https://virtuslab.github.io/besom/docs/context) with `(using besom.Context)`
- Resources are initialized lazily. To make them appear in your physical infrastructure make sure
their evaluation is triggered directly or transitively from the main for-comprehension block of your Pulumi program.
their evaluation is triggered directly or transitively (by referencing them or resources that depend on them) by
including them in the final `Stack` structure of your program.
- Use whatever Scala concepts you are familiar with, infrastructure as code in Besom is still a Scala program,
so you have the full potential of the language to work with.
- Pay attention to the types. You will be instantiating case classes to pass parameters, note their package of origin.
- Some Pulumi functions that allow you to access the metadata of the current stack require access to the `Context`.
`Context` is available as a given (implicitly) in the `Pulumi.run` block, but you can also require it explicitly
in any of your functions with `(using Context)`.

## Requirements

Expand Down
6 changes: 2 additions & 4 deletions besom-cats/src/main/scala/runtime.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ trait CatsEffectModule extends BesomModule:
implicit val toFutureCatsEffectIO: Result.ToFuture[Eff] = new Result.ToFuture[IO]:
def eval[A](fa: => IO[A]): () => Future[A] = () => fa.uncancelable.unsafeToFuture()(using ioRuntime)

// override def run(program: Context ?=> Output[Exports]): Future[Unit] = ???

object Pulumi extends CatsEffectModule
export Pulumi.{component => _, *, given}

Expand All @@ -70,10 +68,10 @@ import scala.reflect.Typeable
* @return
* The component resource.
*/
def component[A <: ComponentResource & Product: RegistersOutputs: Typeable](using ctx: Context)(
def component[A <: ComponentResource & Product: RegistersOutputs: Typeable](
name: NonEmptyString,
typ: ResourceType,
opts: ComponentResourceOptions = ComponentResourceOptions()
)(
f: Context ?=> ComponentBase ?=> A
f: ComponentBase ?=> A
): Output[A] = Pulumi.component(name, typ, opts)(f)
19 changes: 9 additions & 10 deletions besom-cfg/k8s/src/main/scala/ConfiguredContainerArgs.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package besom.cfg.k8s

import besom.cfg.internal.*
import besom.types.{Input, Context, Output}
import besom.types.{Input, Output}
import besom.cfg.*
import besom.json.*
import besom.cfg.containers.*
Expand All @@ -15,7 +15,7 @@ import besom.cfg.k8s.syntax.*

object syntax:
extension (s: Struct)
def foldedToEnvVarArgs(using Context): Output[List[EnvVarArgs]] =
def foldedToEnvVarArgs: Output[List[EnvVarArgs]] =
s.foldToEnv.map(_.map { case (k, v) => EnvVarArgs(name = k, value = v) })

object ConfiguredContainerArgs:
Expand Down Expand Up @@ -48,7 +48,7 @@ object ConfiguredContainerArgs:
volumeDevices: Input.Optional[List[Input[VolumeDeviceArgs]]] = None,
volumeMounts: Input.Optional[List[Input[VolumeMountArgs]]] = None,
workingDir: Input.Optional[String] = None
)(using ctx: Context) = ${
) = ${
applyImpl(
'name,
'image,
Expand All @@ -74,8 +74,7 @@ object ConfiguredContainerArgs:
'tty,
'volumeDevices,
'volumeMounts,
'workingDir,
'ctx
'workingDir
)
}

Expand Down Expand Up @@ -104,8 +103,7 @@ object ConfiguredContainerArgs:
tty: Expr[Input.Optional[Boolean]],
volumeDevices: Expr[Input.Optional[List[Input[VolumeDeviceArgs]]]],
volumeMounts: Expr[Input.Optional[List[Input[VolumeMountArgs]]]],
workingDir: Expr[Input.Optional[String]],
context: Expr[Context]
workingDir: Expr[Input.Optional[String]]
)(using Quotes): Expr[ContainerArgs] =
import quotes.reflect.*

Expand All @@ -130,9 +128,10 @@ object ConfiguredContainerArgs:

case Right(()) =>
val envExpr = '{
val envOutput = ${ env }.asOptionOutput()(using ${ context })
val envOutput = ${ env }.asOptionOutput()
val conf = ${ configuration }
val configurationAsEnvVarArgs = conf.foldedToEnvVarArgs(using $context)
val configurationAsEnvVarArgs = conf.foldedToEnvVarArgs

envOutput.zip(configurationAsEnvVarArgs).map {
case (Some(envVarArgsList), envVarArgsListFromConf) => envVarArgsList ++ envVarArgsListFromConf
case (None, envVarArgsListFromConf) => envVarArgsListFromConf
Expand Down Expand Up @@ -165,7 +164,7 @@ object ConfiguredContainerArgs:
volumeDevices = $volumeDevices,
volumeMounts = $volumeMounts,
workingDir = $workingDir
)(using $context)
)
}
end match
end applyImpl
Expand Down
2 changes: 1 addition & 1 deletion besom-cfg/k8s/src/test/scala/DummyContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object DummyContext:
config <- Config(runInfo.project, isProjectName = true, configMap = configMap, configSecretKeys = configSecretKeys)
resources <- Resources()
given Context = Context.create(runInfo, featureSupport, config, logger, monitor, engine, taskTracker, resources, memo, stackPromise)
_ <- stackPromise.fulfill(StackResource()(using ComponentBase(Output(besom.types.URN.empty))))
_ <- stackPromise.fulfill(StackResource()(using ComponentBase(Output.pure(besom.types.URN.empty))))
yield summon[Context]

end DummyContext
8 changes: 4 additions & 4 deletions besom-cfg/k8s/src/test/scala/RunOutput.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package besom.internal
import scala.concurrent.Future

trait RunOutput[F[+_]]:
def run[A](output: Output[A]): Option[A]
def run[A](output: Output[A])(using Context): Option[A]

object RunOutput:
given runOutputForFuture(using RunResult[Future]): RunOutput[Future] = new RunOutput[Future]:
def run[A](output: Output[A]): Option[A] = RunResult.unsafeRunSync(output.getData)().getValue
def run[A](output: Output[A])(using Context): Option[A] = RunResult.unsafeRunSync(output.getData)().getValue

extension [F[+_], A](output: Output[A])(using ro: RunOutput[F]) def unsafeRunSync(): Option[A] = ro.run(output)
extension [F[+_], A](result: Result[A])(using rr: RunResult[F]) def unsafeRunSync(): A = rr.run(result)
extension [F[+_], A](output: Output[A])(using ro: RunOutput[F]) def unsafeRunSync()(using Context): Option[A] = ro.run(output)
extension [F[+_], A](result: Result[A])(using rr: RunResult[F]) def unsafeRunSync(): A = rr.run(result)
2 changes: 1 addition & 1 deletion besom-cfg/k8s/src/test/scala/RunResult.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait RunResult[F[+_]]:
object RunResult:
given RunResult[Future] = new RunResult[Future]:
given ExecutionContext = ExecutionContext.fromExecutorService(
null, // FJP does seem to swallow fatals
null, // global Future EC reports fatals and uncaught exceptions to stderr, we want to quit on fatals
(t: Throwable) =>
// TODO this has to contain a link to github issue tracker to allow user to easily create a bug report, this is EXTREMELY IMPORTANT
scribe.error("Uncaught fatal error in Future Runtime", t)
Expand Down
6 changes: 3 additions & 3 deletions besom-cfg/lib/src/main/scala/Struct.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import scala.language.dynamics
import scala.quoted.*
import scala.collection.immutable.ListMap
import besom.cfg.internal.MetaUtils
import besom.types.{Output, Context}
import besom.types.Output
import scala.util.chaining.*

// possible types under `Any`:
Expand All @@ -18,7 +18,7 @@ class Struct private (val _values: ListMap[String, Any]) extends Selectable:
onStruct: Map[String, Output[B]] => Output[B],
onList: List[B] => Output[B],
onValue: Any => Output[B]
)(using Context): Output[B] =
): Output[B] =
val onOutput: Output[_] => Output[B] = _.flatMap {
case s: Struct => s.fold(onStruct, onList, onValue)
case a => onValue(a)
Expand Down Expand Up @@ -91,7 +91,7 @@ object Struct extends Dynamic:
)

extension (s: Struct)
def foldToEnv(using Context): Output[List[(String, String)]] = s.fold[List[(String, String)]](
def foldToEnv: Output[List[(String, String)]] = s.fold[List[(String, String)]](
onStruct = { mapB =>
mapB.foldLeft(Output(List.empty[(String, String)])) { case (acc, (k, v)) =>
acc.flatMap { accList =>
Expand Down
18 changes: 18 additions & 0 deletions besom-rpc/project.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//> using scala 3.3.3

//> using options "-java-output-version:11"

// TODO dependency bumps
//> using dep "com.google.protobuf:protobuf-java-util:3.25.1"
//> using dep "com.thesamet.scalapb::scalapb-runtime:0.11.15"
//> using dep "com.thesamet.scalapb::scalapb-runtime-grpc:0.11.15"

//> using publish.name "besom-rpc"
//> using publish.organization "org.virtuslab"
//> using publish.url "https://github.com/VirtusLab/besom"
//> using publish.vcs "github:VirtusLab/besom"
//> using publish.license "Apache-2.0"
//> using publish.repository "central"
//> using publish.developer "lbialy|Łukasz Biały|https://github.com/lbialy"
//> using publish.developer "prolativ|Michał Pałka|https://github.com/prolativ"
//> using repository sonatype:snapshots
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ final case class Status(
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Status] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
private var __serializedSizeMemoized: _root_.scala.Int = 0
private def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0

{
Expand Down Expand Up @@ -208,21 +208,21 @@ object Status extends scalapb.GeneratedMessageCompanion[com.google.rpc.status.St
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = StatusProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = StatusProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null
(__number: @_root_.scala.unchecked) match {
case 3 => __out = com.google.protobuf.any.Any
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.google.rpc.status.Status(
code = 0,
message = "",
details = _root_.scala.Seq.empty
)
implicit class StatusLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.rpc.status.Status]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.google.rpc.status.Status](_l) {
implicit class StatusLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.rpc.status.Status]) extends _root_.scalapb.lenses.MessageLens[UpperPB, com.google.rpc.status.Status](_l) {
def code: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.code)((c_, f_) => c_.copy(code = f_))
def message: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.message)((c_, f_) => c_.copy(message = f_))
def details: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[com.google.protobuf.any.Any]] = field(_.details)((c_, f_) => c_.copy(details = f_))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ object StatusProto extends _root_.scalapb.GeneratedFileObject {
lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq(
com.google.protobuf.any.AnyProto
)
lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]](
com.google.rpc.status.Status
)
private lazy val ProtoBytes: _root_.scala.Array[Byte] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ final case class Alias(
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Alias] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
private var __serializedSizeMemoized: _root_.scala.Int = 0
private def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (alias.urn.isDefined) {
val __value = alias.urn.get
Expand Down Expand Up @@ -111,18 +111,18 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = AliasProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = AliasProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null
(__number: @_root_.scala.unchecked) match {
case 2 => __out = pulumirpc.alias.Alias.Spec
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]](
_root_.pulumirpc.alias.Alias.Spec
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = pulumirpc.alias.Alias(
alias = pulumirpc.alias.Alias.Alias.Empty
)
Expand Down Expand Up @@ -178,8 +178,8 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Spec] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
private var __serializedSizeMemoized: _root_.scala.Int = 0
private def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0

{
Expand Down Expand Up @@ -372,9 +372,9 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.alias.Alias.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.alias.Alias.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = pulumirpc.alias.Alias.Spec(
name = "",
`type` = "",
Expand Down Expand Up @@ -415,7 +415,7 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
override def number: _root_.scala.Int = 6
}
}
implicit class SpecLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Spec]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, pulumirpc.alias.Alias.Spec](_l) {
implicit class SpecLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Spec]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.alias.Alias.Spec](_l) {
def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_))
def `type`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_))
def stack: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.stack)((c_, f_) => c_.copy(stack = f_))
Expand Down Expand Up @@ -446,7 +446,7 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
// @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.Alias.Spec])
}

implicit class AliasLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, pulumirpc.alias.Alias](_l) {
implicit class AliasLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.alias.Alias](_l) {
def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getUrn)((c_, f_) => c_.copy(alias = pulumirpc.alias.Alias.Alias.Urn(f_)))
def spec: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Spec] = field(_.getSpec)((c_, f_) => c_.copy(alias = pulumirpc.alias.Alias.Alias.Spec(f_)))
def alias: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Alias] = field(_.alias)((c_, f_) => c_.copy(alias = f_))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package pulumirpc.alias

object AliasProto extends _root_.scalapb.GeneratedFileObject {
lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq.empty
lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]](
pulumirpc.alias.Alias
)
private lazy val ProtoBytes: _root_.scala.Array[Byte] =
Expand Down
Loading
Loading