Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Fix example issue with sbt plugin file.#979

Merged
RayRoestenburg merged 6 commits into
lightbend:masterfrom
rstento:978-example
Feb 16, 2021
Merged

Fix example issue with sbt plugin file.#979
RayRoestenburg merged 6 commits into
lightbend:masterfrom
rstento:978-example

Conversation

@rstento

@rstento rstento commented Feb 4, 2021

Copy link
Copy Markdown
Contributor

The script is a standard Scala sbt build file--with the addition of the Cloudflow plugin for Akka Streams, the Cloudflow application plugin, and also the Scalafmt plugin that we suggest to keep the style consistent in the application (optional).
+
. Create the file `project/cloudflow-plugins.sbt` and add the Cloudflow plugin dependency in it:
. Create the file `project/cloudflow-plugins.sbt` add logic to get the correct version, and add the Cloudflow plugin dependency:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather specify the exact version instead of using the lastestVersion trick used to easily work with examples for build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just inline this piece in antora and use a version variable to template it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RayRoestenburg, I'm not sure how to do this, there is a {cloudflow-version} variable in antora.yml, but the value is set to "dev". I think the build script might change this, but I can't see whether it would end up being the latest version or not? And, should it be latest, or the latest stable version?

@RayRoestenburg RayRoestenburg Feb 5, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it is {latest-version} @rstento

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it is {cloudflow-version}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It is an asciidoc attribute)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to the variable and committed, but when I build locally, the variable resolves to dev, as you can see below. Can I assume that for production, the build substitutes the correct value?

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, place the attribute in quotes and keep just the last line (e.g. addSbtPlugin...) thanks @rstento !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, will do the same for the commercial doc.

@RayRoestenburg RayRoestenburg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to inline the sbt plugins in text and use antora version variable in there.

@andreaTP andreaTP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last comment

[source,scala,subs=attributes+]
----
include::{cloudflow-examples-version}@docsnippets:ROOT:example$sensor-data-scala/project/cloudflow-plugins.sbt[tag=get-started]
val latestVersion = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lines from 62 to 70 are unnecessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed them, OK now? @andreaTP

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect thanks a lot @rstento !

@RayRoestenburg RayRoestenburg self-requested a review February 16, 2021 18:42
@RayRoestenburg RayRoestenburg merged commit 513c8e7 into lightbend:master Feb 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting started example issue

3 participants