Open ptiede opened 3 years ago
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 https://github.com/cscherrer/KeywordCalls.jl/pull/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.
@ptiede
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!
@cscherrer
does this mean we need to disable precompilation for Soss itself, or for packages that export Soss models?
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
.