Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run the tests #16

Open
reyntjesr opened this issue Sep 9, 2022 · 6 comments
Open

Cannot run the tests #16

reyntjesr opened this issue Sep 9, 2022 · 6 comments

Comments

@reyntjesr
Copy link

Hi,

I want to use your library but I can't run the unit tests.
First upon initilization the library couldn't find the julia bin folder. I solved this for now by simply setting _juliaDir in the Julia.cs file like this:
private static string _JuliaDir= @"C:\Users\rreij\AppData\Local\Programs\Julia-1.8.0\bin";
But there has to be a better way. Should I set an environment variable in windows?

Next the initialization halted at the init_mods() method when running the line:
JULIAdotNET = Julia.Eval("JULIAdotNET");
When I open a Juia REPL in visual code and enter using JULIAdotNET I get the error at the end of this message.

I'm using Windows 11 and Julia 1.8.0.
Because I don't have .net 5 I also changed the project to .net 6.

Here's the error code when running using JULIAdotNET :
[ Info: Precompiling JULIAdotNET [6b20c3d1-d1a1-4518-91d2-6d987d94bff0] TESt!! ERROR: LoadError: ccall method definition: argument 2 type doesn't correspond to a C type Stacktrace: [1] top-level scope @ C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\SharpForJulia\NetCore.jl:74 [2] include(mod::Module, _path::String) @ Base .\Base.jl:419 [3] include(x::String) @ JULIAdotNET.Sharp C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\Sharp.jl:1 [4] top-level scope @ C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\Sharp.jl:21 [5] include(mod::Module, _path::String) @ Base .\Base.jl:419 [6] include(x::String) @ JULIAdotNET C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\JULIAdotNET.jl:1 [7] top-level scope @ C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\JULIAdotNET.jl:5 [8] include @ .\Base.jl:419 [inlined] [9] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing) @ Base .\loading.jl:1554 [10] top-level scope @ stdin:1 in expression starting at C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\SharpForJulia\NetCore.jl:1 in expression starting at C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\Sharp.jl:1 in expression starting at C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\JULIAdotNET.jl:1 in expression starting at stdin:1 ERROR: Failed to precompile JULIAdotNET [6b20c3d1-d1a1-4518-91d2-6d987d94bff0] to C:\Users\rreij\.julia\compiled\v1.8\JULIAdotNET\jl_9C01.tmp. Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:1705 [3] compilecache @ .\loading.jl:1649 [inlined] [4] _require(pkg::Base.PkgId) @ Base .\loading.jl:1337 [5] _require_prelocked(uuidkey::Base.PkgId) @ Base .\loading.jl:1200 [6] macro expansion @ .\loading.jl:1180 [inlined] [7] macro expansion @ .\lock.jl:223 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1144 [9] eval @ .\boot.jl:368 [inlined] [10] eval @ .\Base.jl:65 [inlined] [11] repleval(m::Module, code::Expr, #unused#::String) @ VSCodeServer c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\repl.jl:222 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\repl.jl:186 [13] with_logstate(f::Function, logstate::Any) @ Base.CoreLogging .\logging.jl:511 [14] with_logger @ .\logging.jl:623 [inlined] [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\repl.jl:187 [16] #invokelatest#2 @ .\essentials.jl:729 [inlined] [17] invokelatest(::Any) @ Base .\essentials.jl:726 [18] macro expansion @ c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined] [19] (::VSCodeServer.var"#61#62")() @ VSCodeServer .\task.jl:484

@HyperSphereStudio
Copy link
Owner

There are issues with the released version 3.0.

I am currently fairly busy with college but I will do my best to patch them. Thanks for the log, I will check this out when I have time.

I am currently trying to build an experimental julia runtime based on .NET.
This project would provide full native interopability with .NET and julia and would deprecate JuliadotNet. I will continue to maintain JuliaDotNet for now but keep in mind I plan to deprecate this once I have a working julia runtime .NET prototype.

@reyntjesr
Copy link
Author

Thank for the quick reply.
I'm really looking forward to the new project.

@damian-666
Copy link

if i can actually run code like this https://github.com/weymouth/WaterLily.jl

i would probably use it.. and see about doing the viusalization using a game engine like monogame or mabye Silk.. . his other version is in protobuld.. which is easy to port C# but doesn't not include any of his performance stuff... even if its a many months time, im just curious how likely that is.. i haven't evaluated the code yet, ran pretty fast before but on net 6 might be blazing and with his newest code.

@BambOoxX
Copy link

if i can actually run code like this https://github.com/weymouth/WaterLily.jl

i would probably use it.. and see about doing the viusalization using a game engine like monogame or mabye Silk.. . his other version is in protobuld.. which is easy to port C# but doesn't not include any of his performance stuff... even if its a many months time, im just curious how likely that is.. i haven't evaluated the code yet, ran pretty fast before but on net 6 might be blazing and with his newest code.

If you only intend to plot 2D stuff, try ScottPlot

@damian-666
Copy link

damian-666 commented Oct 11, 2022 via email

@HyperSphereStudio
Copy link
Owner

I have been working on this project this past winter break. Check out the new readme and feel free to ask if you have any questions. A lot of my energy has been going into developing my Spinor Prog Lang. (Which is actually using a lot of the ideas from this project). But I will be happy to answer them! This newest version does not have a lot of the features of the old version (V3) but I don't think anyone used them anyway. It was a nightmare it maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants