cb372 / automagic Goto Github PK
View Code? Open in Web Editor NEWBoilerplate-free model transformation in Scala
Boilerplate-free model transformation in Scala
[warn] /Users/chris/code/automagic/project/Build.scala:50: `<<=` operator is deprecated. Use `key := { x.value }` or `key ~= (old => { newValue })`.
[warn] See http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html
[warn] publishTo <<= version { v =>
[warn] ^
[warn] /Users/chris/code/automagic/project/Build.scala:21: `<+=` operator is deprecated. Try `lhs += { x.value }`
[warn] or see http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html.
[warn] libraryDependencies <+= scalaVersion { s =>
[warn] ^
[warn] /Users/chris/code/automagic/project/Build.scala:9: trait Build in package sbt is deprecated: Use .sbt format instead
[warn] object AutomagicBuild extends Build {
[warn] ^
[warn] three warnings found
Would you mind pushing the latest updates to Maven?
I'm not sure of the actual problem here, but I'm trying to transform to a database row and getting this error when I try to transform:
type mismatch;
[error] found : Tables.this.UserRow
[error] required: my.project.TablesImpl.UserRow
[error] def toRow(user: User): UserRow = transform[User, UserRow](user,
This is my implementation:
import my.project.TablesImpl.UserRow
def toRow(user: User): UserRow = transform[User, UserRow](user)
Tables
is a (generated) trait with final case classes defined inside it (e.g., UserRow), and lives inside target/scala-2.11/src_managed/main. TablesImpl
is an object I've defined that extends this trait, but has nothing defined inside it.
TablesImpl.scala:
object TablesImpl extends {
val profile = slick.jdbc.MySQLProfile
} with Tables
Tables.scala (generated by slick):
object Tables extends {
val profile = slick.jdbc.MySQLProfile
} with Tables
trait Tables {
val profile: slick.jdbc.JdbcProfile
...
final case class UserRow(id: String, ...)
}
Could anyone shed any light on what this error message means? This was working fine until the UserRow case class moved inside the trait, rather than being defined in the same file outside of the trait scope. Is it not possible to transform to a class defined in a trait? Is it something to do with it being final?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.