Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 18 21:15
    mergify[bot] closed #152
  • Oct 18 21:15

    mergify[bot] on master

    Update scalameta to 4.4.29 Merge pull request #152 from sc… (compare)

  • Oct 18 21:13
    scala-steward opened #152
  • Oct 06 19:37

    mergify[bot] on master

    Update sbt-scalajs, scalajs-com… Merge pull request #151 from sc… (compare)

  • Oct 06 19:37
    mergify[bot] closed #151
  • Oct 06 19:36
    scala-steward opened #151
  • Oct 05 00:22

    nafg on master

    Update scala-library, scala-ref… Regenerate workflow with sbt-gi… Merge pull request #148 from sc… (compare)

  • Oct 05 00:22
    nafg closed #148
  • Sep 18 00:19

    mergify[bot] on master

    Update scalatest to 3.2.10 Merge pull request #150 from sc… (compare)

  • Sep 18 00:19
    mergify[bot] closed #150
  • Sep 18 00:17
    scala-steward opened #150
  • Sep 15 14:42
    mergify[bot] closed #149
  • Sep 15 14:42

    mergify[bot] on master

    Update scalameta to 4.4.28 Merge pull request #149 from sc… (compare)

  • Sep 15 14:40
    scala-steward closed #145
  • Sep 15 14:40
    scala-steward commented #145
  • Sep 15 14:40
    scala-steward opened #149
  • Sep 14 21:48
    scala-steward opened #148
  • Sep 10 01:02

    mergify[bot] on master

    Update logback-classic to 1.2.6 Merge pull request #147 from sc… (compare)

  • Sep 10 01:02
    mergify[bot] closed #147
  • Sep 10 00:59
    scala-steward opened #147
Peter Hancox
@phancox
OK will do that in the next couple of days.
Peter Hancox
@phancox
@nafg Submitted a pull request.
nafg
@nafg
@phancox thanks! Will have to look at it when I get a chance
Matthew Pocock
@drdozer
There are plans. There is already a broken version one export. Can't talk - at a con
nafg
@nafg
@drdozer what?
nafg
@nafg
@phancox I found the problem, with G-d's help
      val v2 = k2 flatMap (updateAndSaveLookupLenses(_, e.value))
      for(k <- k2; v <- v2) yield SavedEntity(k, v)
Since v2 is flatMapped from k2, v2 has the INSERT operation from k2 in it already. Then in the for comprehension it flatMaps with k2 again.
Instead v2 should be a DBIO[(K, V)]
Peter Hancox
@phancox
@nafg Thanks for the update. However, I don't understand what has to change to make things work correctly?
nafg
@nafg
@phancox basically it needs to be
val e2 = k2 flatMap { k => (k, updateAndSaveLookupLenses(k, e.value)) }
for((k, v) <- e2) yield SavedEntity(k, v)
or better yet,
for {
  k <- k2
  v <- updateAndSaveLookupLenses(k, e.value)
} yield SavedEntity(k, v)
Peter Hancox
@phancox
@nafg Thanks; I find suggestion two easier to understand.
nafg
@nafg
Yes, the point of # 1 is it's more similar to current code, so it highlights the error better
I agree # 2 is a better way to actually do it
@phancox I see your pull request actually does a few things, like fix the before/after not Awaiting
Any chance you could split each thing into its own PR?
Peter Hancox
@phancox
OK but give me a bit of time; that was my first PR so I'm just learning some of this stuff. Do you want me to create one PR with both fix and test? Plus one for the before/after waits?
nafg
@nafg
Yeah I guess, sounds good
The before/after one could come first
Was there anything else you did?
Peter Hancox
@phancox
My tests would fail with a URL of "jdbc:h2:test". Had to make it a specific location for the DB "jdbc:h2:~/test". This didn't happen before I started making changes; think it had something to do with introducing the DB wait? Quite weird, I will try again without the change if you like?
nafg
@nafg
Ah
Well if the change is necessary for some unrelated reason, then it should be a separate PR. But it seems odd.
The only difference is whether the file is in the current directory or the home directory.
Peter Hancox
@phancox
@nafg Your original tests run fine until I change the before/after functions to wait on the future. Then tests throw
org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:test". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-187]
No idea why those changes would make any difference. I can change to "jdbc:h2:~/test" or would you prefer in memory database ("jdbc:h2:mem:test") which is what I use in all my test suites?
You happy with putting the DB URL change in with the change to wait on the futures? Otherwise the later change will break the tests.
nafg
@nafg
Yes then it's okay. My guess is when it wasn't Awaiting the error message was just not getting printed.
But, the home directory is the wrong place. Maybe add :mem so it's not on disk (then you don't need to change the path).
The commit message should mention the error that got uncovered
Peter Hancox
@phancox
@nafg Completed PR for waiting on futures and H2 database file location. Your test structure is different to mine so ":mem" couldn't be used. Used "jdbc:h2:./test" instead.
Peter Hancox
@phancox
@nafg Do you want me to add another test case as well as the fix in the second PR? I don't think the bug was specific to a table without relations. I'm guessing that multiple inserts were probably already occurring in the existing test cases but didn't break the tests.
nafg
@nafg
@phancox I guess you're right, the test can use the existing tables. But I think it should be its own test since it's checking a different behavior.
Curious why :mem couldn't be used
Peter Hancox
@phancox
@nafg I think the way you're using ScalaTest, each test (including before/after) run in as a different process thus have their own copy of the "test" database in their memory space.
I'll add an explicit test when I have a chance.
Peter Hancox
@phancox
@nafg I've added the test case to the PR. Hoping you can help me with the way I'm supposed to code a many-to-one relationship. e.g., Each address has one suburb and a given suburb has many addresses. I have
```
Peter Hancox
@phancox

@nafg I've added the test case to the PR. Hoping you can help me with the way I'm supposed to code a many-to-one relationship. e.g., Each address has one suburb and a given suburb has many addresses. I have

  case class Suburb(name: String, postcode: String, state: String, country: String)
  case class Address(street1: String, street2: String, suburb: Suburbs.Lookup = Suburbs.Lookup.NotSet)
  val address = Address("Emoh Ruo", "42 Longueville Road",
          Suburbs.Lookup(Ent[Suburbs](Suburb ("Longueville", "2066", "NSW", "Australia"))))

Where I'm trying to create the address is obviously incorrect but I'm no sure what to do. I've tried to work from your person/phone example but its interaction is slightly different in that you're creating the object that has many relations whereas I'm trying to create the object which has the single relation. Could you give me an example of say creating a phone entity rather than a person entity?

Marius Mikelsen
@xZyph
Hey guys, I was wondering if someone had time to help me real quick with a small issue?
I have made a testpage on localhost and done exactly as said on the Slick website, but I still don't get any of the dots, autoplay or any setting. It almost seems like the site doesn't include the .js file, but the weird thing is that the touch function works when sliding between images.
nafg
@nafg
@xZyph wrong room :(
nafg
@nafg
(thinking out loud...)
Problems I want to solve with the current implementation of Lookup:
  • Ability to go between Lookup.Fetched and KeyedEntity (or unify them)
  • Ability to use Lookup in scalajs
  • Lookup.NotSet seems wrong, Slick handles Option <-> NULL mapping, that should be orthogonal