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

@decapode not usable in source #74

Open
lukem12345 opened this issue Sep 12, 2024 · 6 comments
Open

@decapode not usable in source #74

lukem12345 opened this issue Sep 12, 2024 · 6 comments
Assignees

Comments

@lukem12345
Copy link
Member

lukem12345 commented Sep 12, 2024

Attempting to define a particular Decapode in any source file (of the DiagrammaticEquations package) causes a segmentation fault.

To reproduce:

  1. Go to any source file, such as src/language.jl
  2. Define a decapode. e.g.
g = @decapode begin
  A == B + C
end
  1. Open a REPL. Do using DiagrammaticEquations, DiagrammaticEquations.Deca. Attempt to construct a Decapode using the @decapode macro. This causes a segmentation fault.
@lukem12345
Copy link
Member Author

@jpfairbanks Is this an intertypes thing?

@lukem12345
Copy link
Member Author

lukem12345 commented Sep 12, 2024

Following the above steps on commit 88b1874 , no segfault occurs and everything runs as expected. I'll keep bisecting and see what might have introduced this. Hopefully it is something related to Revise.jl or some such

@lukem12345
Copy link
Member Author

Segfaults on 9bbe494
Does not segfault on e4df0b6

@lukem12345
Copy link
Member Author

@quffaro Can you take a gander at this and see if this is an issue for ACSets.jl?

@quffaro
Copy link
Member

quffaro commented Sep 13, 2024

@lukem12345 I was able to replicate the issue. Thank you for the helpful analysis! I'll look at the two commits you posted

@jpfairbanks
Copy link
Member

I bet this has to do with the fact that we don't put the Decapodes ACSet types into their own submodule. So there is no module boundary between code that is in a src/x.jl file and the code that defines the types.

The tests and docs both live in modules that import DiagrammaticEquations rather than directly live inside it. So we can create decapodes outside that module, but not within it.

Hopefully the only fix we would need is to wrap any intertypes generated type with a submodule of the package.

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

3 participants