@Mason I am happy to announce that I have update the Package, and now each file run in its own module, avoiding the conflict of names.
After looking for many option, I change the include(fname)
to
m = Module()
content = join(readlines(dname), "\n")
include_string(m, content)
and it is currently working!
Also, I want to thanks to the users, specially @gsoleilhac and @Palli, for the suggestions and changes. Now:
New changes
- The port can be specified in server and client.
- Each file is run in its own Module to avoid conflict of names.
- The test have been improved to allow run them in parallel (with different port for each testset).
- You can now send specific code to be run in the server.
using DaemonMode
runexpr("using CSV, DataFrames")
fname = "tsp_50.csv";
runexpr("""begin
df = CSV.File("$fname") |> DataFrame
println(last(df, 3))
end""")
3×2 DataFrames.DataFrame
│ Row │ x │ y │
│ │ Float64 │ Float64 │
├─────┼──────────┼────────────┤
│ 1 │ 0.420169 │ 0.628786 │
│ 2 │ 0.892219 │ 0.673288 │
│ 3 │ 0.530688 │ 0.00151249 │
I am going to submit the package to the official repository, but I would like to know if you agree with the name ‘DaemonMode’ or prefer another name.