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: Add @Generated #6808

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions src/tools/schema2kotlin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class Schema2Kotlin extends Schema2Base {
'import arcs.sdk.ArcsInstant',
'import arcs.sdk.BigInt',
'import arcs.sdk.toBigInt',
'import javax.annotation.Generated',
);
}
imports.sort();
Expand Down Expand Up @@ -182,6 +183,8 @@ ${imports.join('\n')}
return `
${typeAliases.join(`\n`)}

${this.opts.wasm ? '' : '@Generated'}

abstract class Abstract${particle.name} : ${this.opts.wasm ? 'WasmParticleImpl' : 'arcs.sdk.BaseParticle'}() {
${this.opts.wasm ? '' : 'override '}val handles: Handles = Handles(${this.opts.wasm ? 'this' : ''})

Expand Down
8 changes: 4 additions & 4 deletions third_party/java/arcs/build_defs/internal/kotlin.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def arcs_kt_plan(
srcs = outs,
platforms = platforms,
visibility = visibility,
deps = arcs_sdk_deps + deps,
deps = arcs_sdk_deps + deps + ["//third_party/java/jsr250_annotations"],
)
return {"outs": outs, "deps": arcs_sdk_deps}

Expand Down Expand Up @@ -634,7 +634,7 @@ def arcs_kt_plan_2(name, package, arcs_sdk_deps, srcs = [], deps = [], visibilit
srcs = plans,
platforms = ["jvm"],
visibility = visibility,
deps = arcs_sdk_deps + deps,
deps = arcs_sdk_deps + deps + ["//third_party/java/jsr250_annotations"],
)

def arcs_kt_schema(
Expand Down Expand Up @@ -712,7 +712,7 @@ def arcs_kt_schema(
name = name,
srcs = outs,
platforms = platforms,
deps = arcs_sdk_deps,
deps = arcs_sdk_deps + ["//third_party/java/jsr250_annotations"],
visibility = visibility,
)
outdeps = outdeps + arcs_sdk_deps
Expand Down Expand Up @@ -817,7 +817,7 @@ def arcs_kt_gen(
name = name,
srcs = depset(schema["outs"] + plan["outs"]).to_list(),
platforms = platforms,
deps = depset(schema["deps"] + plan["deps"] + manifest_only(deps, inverse = True)).to_list(),
deps = depset(schema["deps"] + plan["deps"] + manifest_only(deps, inverse = True)).to_list() + ["//third_party/java/jsr250_annotations"],
visibility = visibility,
)

Expand Down