Skip to content

Make the sample compile against Main - #10

Merged
dubinsky merged 1 commit into
masterfrom
cursor/sample-compiles-against-main-c03b
Nov 12, 2026
Merged

dubinsky merged 1 commit into
masterfrom
cursor/sample-compiles-against-main-c03b

Conversation

@dubinsky

Copy link
Copy Markdown
Owner

The sample is the in-repo consumer, and it did not compile: it still constructed Builder against library 0.2.0, Besom 0.3.2, and GCP 7.26.0, with classroomTeachersGroup undefined. README Setup pointed at domain-infra/src/main/scala/tld/domain/infra/besom/Main.scala, which is not in the tree.

tld.domain.infra.Main now extends org.podval.tools.besom.Main and does not define main (Main.main is Pulumi.run). application.mainClass is that object. Template values stay domain.tld and domain-infra. The service and role lists from the old sample are the three hooks. There is one DnsZone and no classroomTeachersGroup. grokBotKeysDirectoryName is overridden to Domain, so a run is not how you discover that domain.tld misses the default match.

Sample comments, not a new README chapter: subclass Main and fill the hooks; the consumer brings its own Besom jars because the library's are compileOnly; version literals stay inline (Besom rejects a val in CustomResourceOptions); WithResources forces child Outputs; a hand-built resource has to pass gcpResourceOptions() or cloudflareResourceOptions(); CognoMath sets -Xss8m because eight zones overflow Result.runM. This sample has one zone and does not set the flag. The sample does not pass Bucket's storage class parameter.

Dependencies match this repo's pins: besom-core_3:0.5.2, besom-gcp_3:9.0.0-core.0.5, besom-cloudflare_3:6.20.0-core.0.5, and org.podval.tools:org.podval.tools.pulumi:0.6.0. settings.gradle follows the infra shape (conventions plugin 0.4.0 from Maven, gradle.parent == null around the conventions includeBuild) and includeBuilds the repo root (../..), which substitutes that coordinate. gradle.properties sets scalaVersion=3.10.0. The root settings.gradle does not include the sample.

CI compiles the sample with ./gradlew -p domain-infra/besom compileScala and does not run it. README changes are the Setup section only: the main-class link, the domain-infra/src path, and the four dependency bullets. Domains, the bootstrap gcloud steps, the import commands, the GCP 6→7 section, and the 0.6.0 changelog entry are untouched. No edits under src/main/scala.

Verified locally on JDK 25: ./gradlew build and ./gradlew -p domain-infra/besom compileScala. dependencyInsight shows org.podval.tools:org.podval.tools.pulumi:0.6.0 -> project :pulumi.

Open in Web Open in Cursor 

The sample object extends Main, fills the hooks, and overrides
grokBotKeysDirectoryName. Dependencies match the library pins, and
includeBuild of the repo root substitutes the checkout. CI compiles
the sample and does not run it.

Co-authored-by: Leonid Dubinsky <dub@podval.org>
@dubinsky
dubinsky merged commit ca927a1 into master Nov 12, 2026
2 checks passed
@dubinsky
dubinsky deleted the cursor/sample-compiles-against-main-c03b branch November 18, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant