Skip to content

Commit 7169d76

Browse files
authored
Fix #2: Support 0.4.0-M2 (#3)
* Changes to support 0.4.0-M2 * Latest scalafmt * Finish upgrade due to scalafmt * Update local scalafmt script, script cache, and build.sbt change * Refactor to unsafe package and undate readme
1 parent be6bb4e commit 7169d76

File tree

10 files changed

+293
-281
lines changed

10 files changed

+293
-281
lines changed

.scalafmt.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
version = 1.5.1
1+
version = 2.3.0
22
style = defaultWithAlign
33
docstrings = JavaDoc
44
assumeStandardLibraryStripMargin = true
55
project.git = true
6+
# changed 1.6 or after
7+
align.openParenCallSite = true
8+
align.openParenDefnSite = true
9+
# avoid wrapping parens on new line
10+
danglingParentheses.defnSite = false
11+
danglingParentheses.callSite = false

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ converted to [LLVM IR](http://llvm.org/). Finally LLVM code is optimized
1515
and compiled by [Clang](http://clang.llvm.org/) to produce a native executable.
1616

1717
## Getting started
18-
[![Maven Central](https://img.shields.io/maven-central/v/org.ekrich/sblas_native0.3_2.11.svg)](https://maven-badges.herokuapp.com/maven-central/org.ekrich/sblas_native0.3_2.11)
18+
[![Maven Central](https://img.shields.io/maven-central/v/org.ekrich/sblas_native0.4.0-M2_2.11.svg)](https://maven-badges.herokuapp.com/maven-central/org.ekrich/sblas_native0.4.0-M2_2.11)
1919

2020
If you are already familiar with Scala Native you can jump right in by adding the following dependency in your `sbt` build file.
2121

@@ -43,7 +43,7 @@ $ sudo apt-get install libatlas-base-dev
4343
* Other OSes need to have `libcblas` available on the system.
4444

4545
## Usage and Help
46-
[![scaladoc](https://www.javadoc.io/badge/org.ekrich/sblas_native0.3_2.11.svg?label=scaladoc)](https://www.javadoc.io/doc/org.ekrich/sblas_native0.3_2.11)
46+
[![scaladoc](https://www.javadoc.io/badge/org.ekrich/sblas_native0.4.0-M2_2.11.svg?label=scaladoc)](https://www.javadoc.io/doc/org.ekrich/sblas_native0.4.0-M2_2.11)
4747
[![Join chat https://gitter.im/ekrich/sblas](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ekrich/sblas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4848

4949
Reference the link above for Scaladoc. The documentation is a little sparse but hopefully will improve with time.
@@ -56,7 +56,7 @@ $ cd <directory entered after the prompt>
5656
$ sbt run
5757
```
5858

59-
In addition, look at the `v0.1.1` [sblas unit tests](https://github.com/ekrich/sblas/blob/v0.1.1/sblas/src/test/scala/org/ekrich/blas/snic/BlasSuite.scala) for other examples of usage.
59+
In addition, look at the [sblas unit tests](https://github.com/ekrich/sblas/blob/v0.2.0/sblas/src/test/scala/org/ekrich/blas/unsafe/BlasSuite.scala) for other examples of usage.
6060

6161
## BLAS References and External Documentation
6262

@@ -83,3 +83,4 @@ IBM Website:
8383
## Versions
8484

8585
Release [0.1.1](https://github.com/ekrich/sblas/releases/tag/v0.1.1) - (2019-05-01)<br/>
86+
Release [0.2.0](https://github.com/ekrich/sblas/releases/tag/v0.2.0) - (2019-12-05)<br/>

build.sbt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
lazy val prevVersion = "0.1.1"
2-
lazy val nextVersion = "0.1.1"
2+
lazy val nextVersion = "0.2.0"
33

44
lazy val scala211 = "2.11.12"
55

@@ -34,12 +34,14 @@ def versionFmt(out: sbtdynver.GitDescribeOutput): String = {
3434
}
3535

3636
lazy val commonSettings = Seq(
37-
libraryDependencies += "com.lihaoyi" %%% "utest" % "0.6.7" % Test,
38-
testFrameworks += new TestFramework("utest.runner.Framework"),
37+
libraryDependencies += "com.github.lolgab" %%% "minitest" % "2.5.0-5f3852e" % Test,
38+
testFrameworks += new TestFramework("minitest.runner.Framework"),
3939
scalaVersion := scala211,
4040
logLevel := Level.Info, // Info, Debug
41-
nativeLinkStubs := true
42-
// nativeMode := "release"
41+
nativeLinkStubs := true,
42+
// nativeMode := "release",
43+
// mima settings
44+
mimaPreviousArtifacts := Set("org.ekrich" %%% "sblas" % prevVersion)
4345
)
4446

4547
lazy val root = project

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.2.8
1+
sbt.version = 1.3.4

project/plugins.sbt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
// to test Scala Native snapshots
12
resolvers += Resolver.sonatypeRepo("snapshots")
23

3-
// Current release 0.3.8
4-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.9")
5-
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.6")
4+
// includes sbt-dynver sbt-pgp sbt-sonatype sbt-git
5+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.4.31")
6+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1")
7+
8+
// Scala Native support
9+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")

sblas/src/main/scala/org/ekrich/blas/snic/blas.scala renamed to sblas/src/main/scala/org/ekrich/blas/unsafe/blas.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
1414
*/
15-
package org.ekrich.blas.snic
15+
package org.ekrich.blas
16+
package unsafe
1617

17-
import scala.scalanative.native._
18-
import scala.scalanative.native.complex.{CDoubleComplex, CFloatComplex}
18+
import scala.scalanative.unsafe.{extern, link, Ptr}
19+
import scala.scalanative.unsafe.{CDouble, CFloat, CInt, CSize, CString, CVarArg}
20+
import scala.scalanative.libc.complex.{CDoubleComplex, CFloatComplex}
1921

2022
/**
2123
* Used for Level 2 and 3 BLAS
@@ -1678,5 +1680,5 @@ object blas {
16781680
def cblas_xerbla(p: CInt,
16791681
rout: CString,
16801682
form: CString,
1681-
varArgs: CVararg*): Unit = extern
1683+
varArgs: CVarArg*): Unit = extern
16821684
}

sblas/src/test/scala/org/ekrich/blas/snic/BlasSuite.scala

Lines changed: 0 additions & 262 deletions
This file was deleted.

0 commit comments

Comments
 (0)