Skip to content

Commit

Permalink
update to Scala 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spamegg1 committed Aug 23, 2024
1 parent cee240a commit cde53db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: coursier/[email protected]
- uses: VirtusLab/[email protected].1
- uses: VirtusLab/[email protected].3
- run: scala-cli compile .
2 changes: 1 addition & 1 deletion project.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//> using scala 3.4.2
//> using scala 3.5.0
//> using platform native
//> using nativeVersion 0.5.5
//> using exclude "gatling/*"
Expand Down
2 changes: 1 addition & 1 deletion scripts/installGatling.sc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env -S scala-cli
//> using dep com.lihaoyi::os-lib:0.10.3
//> using dep com.lihaoyi::os-lib:0.10.4

// download Gatling Highcharts Bundle
println("Downloading Gatling 3.10.5 to directory ./gatling")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object FilePipe:

var activeStreams: mutable.Set[Int] = mutable.Set()
var handlers = mutable.HashMap[Int, Pipe[String, String]]()
var serial = 0
var serial = 0 // keep mutable state, just like SyncPipe

def apply(path: CString): Pipe[String, String] =
val req = stdlib.malloc(uv_req_size(UV_FS_REQ_T)).asInstanceOf[FSReq]
Expand All @@ -39,13 +39,15 @@ object FilePipe:
println("about to read")
uv_fs_read(ch07.EventLoop.loop, req, fd, buf, 1, -1, readCB)
println("read started")

val pipe = Pipe.source[String]
handlers(fd) = pipe

println("about to return")
activeStreams += fd
pipe

val readCB: FSCB = CFuncPtr1.fromScalaFunction[FSReq, Unit]: (req: FSReq) =>
val readCB: FSCB = CFuncPtr1.fromScalaFunction: (req: FSReq) =>
println("read callback fired!")
val res = uv_fs_get_result(req)
println(s"got result: $res")
Expand Down

0 comments on commit cde53db

Please sign in to comment.