couchbase-scala-macro


License

License

Categories

Categories

Scala Languages Couchbase Data Databases
GroupId

GroupId

com.sandinh
ArtifactId

ArtifactId

couchbase-scala-macro_0.24
Last Version

Last Version

1.1.0-e582b2a
Release Date

Release Date

Type

Type

jar
Description

Description

couchbase-scala-macro
couchbase-scala-macro
Project URL

Project URL

https://couchbase.com
Project Organization

Project Organization

Couchbase, Inc.
Source Code Management

Source Code Management

https://github.com/couchbase/couchbase-jvm-clients

Download couchbase-scala-macro_0.24

How to add to project

<!-- https://jarcasting.com/artifacts/com.sandinh/couchbase-scala-macro_0.24/ -->
<dependency>
    <groupId>com.sandinh</groupId>
    <artifactId>couchbase-scala-macro_0.24</artifactId>
    <version>1.1.0-e582b2a</version>
</dependency>
// https://jarcasting.com/artifacts/com.sandinh/couchbase-scala-macro_0.24/
implementation 'com.sandinh:couchbase-scala-macro_0.24:1.1.0-e582b2a'
// https://jarcasting.com/artifacts/com.sandinh/couchbase-scala-macro_0.24/
implementation ("com.sandinh:couchbase-scala-macro_0.24:1.1.0-e582b2a")
'com.sandinh:couchbase-scala-macro_0.24:jar:1.1.0-e582b2a'
<dependency org="com.sandinh" name="couchbase-scala-macro_0.24" rev="1.1.0-e582b2a">
  <artifact name="couchbase-scala-macro_0.24" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.sandinh', module='couchbase-scala-macro_0.24', version='1.1.0-e582b2a')
)
libraryDependencies += "com.sandinh" % "couchbase-scala-macro_0.24" % "1.1.0-e582b2a"
[com.sandinh/couchbase-scala-macro_0.24 "1.1.0-e582b2a"]

Dependencies

compile (3)

Group / Artifact Type Version
com.sandinh : couchbase-scala-implicits_0.24 jar 1.1.0-e582b2a
ch.epfl.lamp : dotty-library_0.24 jar 0.24.0
io.circe : circe-jawn_0.24 jar 0.13.0

test (1)

Group / Artifact Type Version
org.scalameta : munit_0.24 jar 0.7.9

Project Modules

There are no modules declared in this project.

Couchbase JVM Clients

license java-client scala-client

This repository contains the third generation of the Couchbase SDKs on the JVM ("SDK 3").

Overview

This repository contains the following projects:

  • core-io: the foundational library for all language bindings
  • java-client: the Java language binding
  • scala-client: the Scala language binding
  • tracing-opentracing: experimental module to integrate with OpenTracing
  • tracing-opentelemetry: experimental module to integrate with OpenTelemetry

Other toplevel modules might be present which contain examples, experimental code or internal tooling and test infrastructure.

Documentation is now available for Java and Scala

Usage

Stable releases are published on maven central.

For Java:

<dependencies>
    <dependency>
        <groupId>com.couchbase.client</groupId>
        <artifactId>java-client</artifactId>
        <version>3.0.8</version>
    </dependency>
</dependencies>

For Scala:

<dependencies>
    <dependency>
        <groupId>com.couchbase.client</groupId>
        <artifactId>scala-client_2.12</artifactId>
        <version>1.0.8</version>
    </dependency>
</dependencies>

or if you use sbt:

libraryDependencies += "com.couchbase.client" %% "scala-client" % "1.0.8"

Building

You can always also just build it from source:

$ git clone https://github.com/couchbase/couchbase-jvm-clients.git
$ cd couchbase-jvm-clients
$ make

Yes, we need make because maven doesn't support the setup we need and neither does gradle. If you want to build for different Scala versions, after the first make you can do this through:

$ ./mvnw -Dscala.compat.version=2.13 -Dscala.compat.library.version=2.13.1 clean install
$ ./mvnw -Dscala.compat.version=2.11 -Dscala.compat.library.version=2.11.12 clean install

Notes:

  • The two mvn runs are to cross-compile the Scala SDK for Scala 2.11, and 2.13
  • Couchbase only officially provides, tests and supports a Scala 2.12 build. Our community kindly added the capability to create builds for Scala 2.11 and 2.13, and users are of course welcome to create such builds; but Couchbase cannot provide support for them.
  • When building for Scala 2.11, JDK 8 should be used. If JDK 11 is used then goal scala:doc-jar will fail
  • Default scala.compat.X properties are defined in file [.mvn/maven.config]
  • You can always go into one of the sub-directories like core-io to only build or test an individual project:
    cd scala-client
    ../mvnw -DskipTests clean install
  • Use -DskipTests to skip testing.

Testing

You can test like this:

$ ./mvnw clean test -fae

Branches & Release Trains

Since this monorepo houses different versions of different artifacts, release train names have been chosen to identify a collection of releases that belong to the same train.

These trains are named after historic computers for your delight.

Tags in each branch are named branchname-ga for the initial GA release, and then subsequently branchname-sr-n for each service release. See the tag information for specifics of what's in there.

Release Train Java-Client Scala-Client Core-Io Tracing-OpenTelemetry Tracing-OpenTracing
colossus 3.0.x 1.0.x 2.0.x 0.2.x 0.2.x

Testing Info

To cover all tests, the suite needs to be run against the following topologies, but by default it runs against the mock. Recommended topologies:

  • 1 node, no replica
  • 2 nodes, 1 replica
  • 2 nodes, 2 replicas

Also to have maximum service coverage use a cluster which has all services enabled (can be MDS setup).

Building Documentation

Documentation will be built automatically by the mvn install command above.

According to the Maven standard, the file is named artifact-version-javadoc.jar (i.e. java-client-3.0.4-javadoc.jar).

This file can be extracted (jars are like zip files) with the following command:

jar xvf java-client-3.0.4-javadoc.jar

This will extract the contents of the javadoc file into the current directory. After the original jar is removed it can be uploaded to s3.

The location of the javadoc files depends on where you get it from. The easiest is, once published, from Maven central. For example, look it up on Maven central: https://search.maven.org/artifact/com.couchbase.client/java-client/3.0.4/jar and download the javadoc jar: https://search.maven.org/remotecontent?filepath=com/couchbase/client/java-client/3.0.4/java-client-3.0.4-javadoc.jar

The exact same approach can be used for any artifact, including Scala. The Scala documentation can also be built with this command:

cd scala-client && mvn scala:doc

IDE Configuration

IntelliJ

Scala code is automatically formatted on compile with the tool scalafmt. To make IntelliJ use the same settings:

Editor -> Code Style -> Scala, change formatter to scalafmt and check Reformat on file save

(mvn validate can be used from command-line to force reformat)

com.sandinh

Versions

Version
1.1.0-e582b2a