hyperspherestudio / jdotnet Goto Github PK
View Code? Open in Web Editor NEWJulia-.NET Interface Library. Provides Interop between the .NET ecosystem and the Julia programming language
License: MIT License
Julia-.NET Interface Library. Provides Interop between the .NET ecosystem and the Julia programming language
License: MIT License
Hi great package but I'm curious what's the difference between this and https://github.com/azurefx/DotNET.jl ? It would be nice if these things could join efforts.
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
The unit tests, and also doing Pkg.precompile() fail with
ERROR: LoadError: ccall method definition: argument 2 type doesn't correspond to a C type
Stacktrace:
[1] top-level scope
@ C:\Users\mpinxte1\.julia\packages\JULIAdotNET\7zJUz\src\julia\SharpForJulia\NetCore.jl:74
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:419
[3] include(x::String)
@ JULIAdotNET.Sharp C:\Users\mpinxte1\.julia\packages\JULIAdotNET\7zJUz\src\julia\Sharp.jl:1
[4] top-level scope
@ C:\Users\mpinxte1\.julia\packages\JULIAdotNET\7zJUz\src\julia\Sharp.jl:21
Could this be related to JuliaLang/julia#43953?
Other package with a similar issue: JuliaData/SentinelArrays.jl#69
I'm using Julia 1.8.2
Hi and thanks again for your effort. I just started testing this library.
While trying to reproduce you example in the github's frontpage, I could not find how to specify JuliaOptions
. Was this renamed ?
Also it seems Julia.Init
can only accept an optional string argument.
Was the example implementation valid only in 1.x.x, or should it still work ?
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.