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

jlqml assumes QML is in scope #95

Closed
bramtayl opened this issue Sep 14, 2020 · 5 comments
Closed

jlqml assumes QML is in scope #95

bramtayl opened this issue Sep 14, 2020 · 5 comments
Labels
bug needs more info Clarification or reproducable example needed
Milestone

Comments

@bramtayl
Copy link
Contributor

I'm working on a QML application at Justly.jl and I'm getting this error if I run without first loading QML:

ERROR: Could not find module QML when looking up function get_julia_call
Stacktrace:
 [1] exec at /home/brandon/.julia/packages/CxxWrap/ZOkSN/src/CxxWrap.jl:590 [inlined]
 [2] justly_interactive(; wave::AudioSchedules.SawTooth{7}, make_envelope::Function, initial_key::Unitful.Quantity{Int64,𝐓^-1,Unitful.FreeUnits{(Hz,),𝐓^-1,nothing}}, beat_duration::Unitful.Quantity{Int64,𝐓,Unitful.FreeUnits{(s,),𝐓,nothing}}, test::Bool) at /home/brandon/.julia/dev/Justly/src/Justly.jl:220
 [3] justly_interactive() at /home/brandon/.julia/dev/Justly/src/Justly.jl:179
 [4] top-level scope at REPL[8]:1
 [5] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1088

I suspect it's coming from a hygeine issue with the Base @cfunction macro but I'm not 100% sure.

@barche
Copy link
Collaborator

barche commented Sep 15, 2020

This is actually coming from here:

https://github.com/barche/jlqml/blob/1e2fb83a7805b7ee7048b6cb1d22fa4bcf59095b/julia_function.cpp#L22

That line assumes there is a module "QML" in scope, to fix this I will have to make changes to jlqml.

@barche barche added the bug label Sep 15, 2020
@bramtayl bramtayl changed the title at-cfunction macro hygeine issue? jlqml assumes QML is in scope Sep 24, 2020
@rajeck1234
Copy link

rajeck1234 commented Mar 1, 2023

Hlw @barche I am Utkarsh Kumar from (IIT KHARAGPUR in 3rd year pursuing BTech) and i want to contribute to GSOC 2023 in this project based on the C++ please give me some guidance where i should i start working. Thankfull to you

@barche
Copy link
Collaborator

barche commented Mar 2, 2023

Hi, for this particular issue the way to solve it would be to add a global pointer to the QML module, as is done in libcxxwrap-julia: https://github.com/JuliaInterop/libcxxwrap-julia/blob/9fa283de6066ac4c2a991d8d715152f2933bb67a/include/jlcxx/module.hpp#L139

@ufechner7 ufechner7 added this to the 0.8.2 milestone Oct 16, 2023
@ufechner7
Copy link
Member

Is there an example to reproduce the problem?

@ufechner7 ufechner7 added the needs more info Clarification or reproducable example needed label Oct 16, 2023
@barche
Copy link
Collaborator

barche commented Oct 18, 2023

This is actually already implemented, v0.8.1 contains the last missed case of where the QML module was referenced explicitly.

@barche barche closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs more info Clarification or reproducable example needed
Projects
None yet
Development

No branches or pull requests

4 participants