-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Using Soss with packages #267
Comments
Hi @ptiede , thanks for bringing this up! I haven't used Soss in the way you describe, but it's definitely something we want to support. With some of the metaprogramming tricks we do, we need to be careful things work properly across module and package boundaries. It's hard to say immediately whether this might be a module issue or a precompilation issue, but @rfourquet showed me a nice way of making tests for this case in cscherrer/KeywordCalls.jl#6 . So I'll add something similar to the Soss tests and start digging into it. @thautwarm any immediate thoughts on this? If not I'll see what I can find and may bug you with GG questions :) |
I've just found that the new version of GG cannot work with precompilation, so tentatively you cannot precache defining a model. |
So far you need to disable precompilation. |
@thautwarm thank you! It looks like that fixed everything. Thank you for looking into this so quickly! |
Thanks @thautwarm ! Just to be sure I understand, does this mean we need to disable precompilation for Soss itself, or for packages that export Soss models? |
@ptiede You're welcome!
If any Soss model is created at the module top-level, it cannot get correctly precompiled. Besides, making a Soss model at top-level means it's defined statically and not runtime-generated. I'm thinking about how to make things work.. |
Besides, if all Soss models are created at runtime, it's okay to use precompile the downstream module. |
Hi, First I want to say sorry for not being able to find a minimal working example.
I am running into a strange stack trace that seems to occur when I define a Soss model in a package and then try to construct it.
For example, suppose I have a package that looks like
Then when I run into an issue when I try to run the model in a repl where I import module X, e.g.
I get a stack trace like
The annoying part is that if I define the module in my current session and then just call it everything seems to work fine. The issue only seems to arise when I define the models in a separate package and then bring them into scope with
using
.The text was updated successfully, but these errors were encountered: